Message ID | 20230118170624.9326-1-nirmoy.das@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Remove unused variable | expand |
On Wed, Jan 18, 2023 at 06:06:24PM +0100, Nirmoy Das wrote: > Removed unused i915 var. > > Fixes: a273e95721e9 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized") > Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> and pushed to drm-misc-fixes. Thanks for the patch. > --- > drivers/gpu/drm/i915/i915_driver.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c > index 33e231b120c1..6469c7c1e154 100644 > --- a/drivers/gpu/drm/i915/i915_driver.c > +++ b/drivers/gpu/drm/i915/i915_driver.c > @@ -1071,8 +1071,6 @@ static int i915_driver_open(struct drm_device *dev, struct drm_file *file) > */ > static void i915_driver_lastclose(struct drm_device *dev) > { > - struct drm_i915_private *i915 = to_i915(dev); > - > intel_fbdev_restore_mode(dev); > > vga_switcheroo_process_delayed_switch(); > -- > 2.39.0 >
On Wed, Jan 18, 2023 at 1:35 PM Rodrigo Vivi <rodrigo.vivi@intel.com> wrote: > > On Wed, Jan 18, 2023 at 06:06:24PM +0100, Nirmoy Das wrote: > > Removed unused i915 var. > > > > Fixes: a273e95721e9 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized") > > Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> > > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > > and pushed to drm-misc-fixes. > > Thanks for the patch. +dri-devel ml which was forgotten on the patch and on my reply. sorry about that. just noticed after had hit sent in the email here... > > > --- > > drivers/gpu/drm/i915/i915_driver.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c > > index 33e231b120c1..6469c7c1e154 100644 > > --- a/drivers/gpu/drm/i915/i915_driver.c > > +++ b/drivers/gpu/drm/i915/i915_driver.c > > @@ -1071,8 +1071,6 @@ static int i915_driver_open(struct drm_device *dev, struct drm_file *file) > > */ > > static void i915_driver_lastclose(struct drm_device *dev) > > { > > - struct drm_i915_private *i915 = to_i915(dev); > > - > > intel_fbdev_restore_mode(dev); > > > > vga_switcheroo_process_delayed_switch(); > > -- > > 2.39.0 > >
On Wed, 18 Jan 2023, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote: > On Wed, Jan 18, 2023 at 06:06:24PM +0100, Nirmoy Das wrote: >> Removed unused i915 var. >> >> Fixes: a273e95721e9 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized") >> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> > > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > > and pushed to drm-misc-fixes. > > Thanks for the patch. I guess this was a quick fix to avoid warnings about it. But really, for i915 the way to go would be to have i915 local var, and pass that around instead of struct drm_device *dev. BR, Jani. > >> --- >> drivers/gpu/drm/i915/i915_driver.c | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c >> index 33e231b120c1..6469c7c1e154 100644 >> --- a/drivers/gpu/drm/i915/i915_driver.c >> +++ b/drivers/gpu/drm/i915/i915_driver.c >> @@ -1071,8 +1071,6 @@ static int i915_driver_open(struct drm_device *dev, struct drm_file *file) >> */ >> static void i915_driver_lastclose(struct drm_device *dev) >> { >> - struct drm_i915_private *i915 = to_i915(dev); >> - >> intel_fbdev_restore_mode(dev); >> >> vga_switcheroo_process_delayed_switch(); >> -- >> 2.39.0 >>
On 1/19/2023 10:21 AM, Jani Nikula wrote: > On Wed, 18 Jan 2023, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote: >> On Wed, Jan 18, 2023 at 06:06:24PM +0100, Nirmoy Das wrote: >>> Removed unused i915 var. >>> >>> Fixes: a273e95721e9 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized") >>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> >> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> >> >> and pushed to drm-misc-fixes. >> >> Thanks for the patch. > I guess this was a quick fix to avoid warnings about it. Yes, it was quick fix. > > But really, for i915 the way to go would be to have i915 local var, and > pass that around instead of struct drm_device *dev. Yes makes sense. I sent a patch for that. Thanks, Nirmoy > > BR, > Jani. > > >>> --- >>> drivers/gpu/drm/i915/i915_driver.c | 2 -- >>> 1 file changed, 2 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c >>> index 33e231b120c1..6469c7c1e154 100644 >>> --- a/drivers/gpu/drm/i915/i915_driver.c >>> +++ b/drivers/gpu/drm/i915/i915_driver.c >>> @@ -1071,8 +1071,6 @@ static int i915_driver_open(struct drm_device *dev, struct drm_file *file) >>> */ >>> static void i915_driver_lastclose(struct drm_device *dev) >>> { >>> - struct drm_i915_private *i915 = to_i915(dev); >>> - >>> intel_fbdev_restore_mode(dev); >>> >>> vga_switcheroo_process_delayed_switch(); >>> -- >>> 2.39.0 >>>
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 33e231b120c1..6469c7c1e154 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1071,8 +1071,6 @@ static int i915_driver_open(struct drm_device *dev, struct drm_file *file) */ static void i915_driver_lastclose(struct drm_device *dev) { - struct drm_i915_private *i915 = to_i915(dev); - intel_fbdev_restore_mode(dev); vga_switcheroo_process_delayed_switch();
Removed unused i915 var. Fixes: a273e95721e9 ("drm/i915: Allow switching away via vga-switcheroo if uninitialized") Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> --- drivers/gpu/drm/i915/i915_driver.c | 2 -- 1 file changed, 2 deletions(-)