Message ID | 20201112190039.2785914-2-lee.jones@linaro.org |
---|---|
State | Accepted |
Commit | eee013c1f1280946b79f9baca9f4d3b45b901fa1 |
Headers | show |
Series | Rid W=1 warnings from GPU | expand |
On Thu, Nov 12, 2020 at 07:00:10PM +0000, Lee Jones wrote: > The comment about them (also removed) says: > > /* fb_rsrc and aper_rsrc aren't really used currently, but still exist > * in case we decide we need information on the BAR for BSD in the > * future. > */ > > Well that was written 12 years ago in 2008. We are now in the future > and they are still superfluous. We can always add them again at a > later date if they are ever required. > > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/savage/savage_bci.c: In function ‘savage_driver_firstopen’: > drivers/gpu/drm/savage/savage_bci.c:580:24: warning: variable ‘aper_rsrc’ set but not used [-Wunused-but-set-variable] > drivers/gpu/drm/savage/savage_bci.c:580:15: warning: variable ‘fb_rsrc’ set but not used [-Wunused-but-set-variable] > > Cc: David Airlie <airlied@linux.ie> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> > --- Thanks, applied to drm-misc-next. Sam
On Thu, 12 Nov 2020, Sam Ravnborg wrote: > On Thu, Nov 12, 2020 at 07:00:10PM +0000, Lee Jones wrote: > > The comment about them (also removed) says: > > > > /* fb_rsrc and aper_rsrc aren't really used currently, but still exist > > * in case we decide we need information on the BAR for BSD in the > > * future. > > */ > > > > Well that was written 12 years ago in 2008. We are now in the future > > and they are still superfluous. We can always add them again at a > > later date if they are ever required. > > > > Fixes the following W=1 kernel build warning(s): > > > > drivers/gpu/drm/savage/savage_bci.c: In function ‘savage_driver_firstopen’: > > drivers/gpu/drm/savage/savage_bci.c:580:24: warning: variable ‘aper_rsrc’ set but not used [-Wunused-but-set-variable] > > drivers/gpu/drm/savage/savage_bci.c:580:15: warning: variable ‘fb_rsrc’ set but not used [-Wunused-but-set-variable] > > > > Cc: David Airlie <airlied@linux.ie> > > Cc: Daniel Vetter <daniel@ffwll.ch> > > Cc: dri-devel@lists.freedesktop.org > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > --- > > Thanks, applied to drm-misc-next. Thanks for your prompt response Sam. Much appreciated.
diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c index 6889d6534ebab..606e5b807a6e7 100644 --- a/drivers/gpu/drm/savage/savage_bci.c +++ b/drivers/gpu/drm/savage/savage_bci.c @@ -573,19 +573,12 @@ int savage_driver_firstopen(struct drm_device *dev) { drm_savage_private_t *dev_priv = dev->dev_private; unsigned long mmio_base, fb_base, fb_size, aperture_base; - /* fb_rsrc and aper_rsrc aren't really used currently, but still exist - * in case we decide we need information on the BAR for BSD in the - * future. - */ - unsigned int fb_rsrc, aper_rsrc; int ret = 0; if (S3_SAVAGE3D_SERIES(dev_priv->chipset)) { - fb_rsrc = 0; fb_base = pci_resource_start(dev->pdev, 0); fb_size = SAVAGE_FB_SIZE_S3; mmio_base = fb_base + SAVAGE_FB_SIZE_S3; - aper_rsrc = 0; aperture_base = fb_base + SAVAGE_APERTURE_OFFSET; /* this should always be true */ if (pci_resource_len(dev->pdev, 0) == 0x08000000) { @@ -607,10 +600,8 @@ int savage_driver_firstopen(struct drm_device *dev) } else if (dev_priv->chipset != S3_SUPERSAVAGE && dev_priv->chipset != S3_SAVAGE2000) { mmio_base = pci_resource_start(dev->pdev, 0); - fb_rsrc = 1; fb_base = pci_resource_start(dev->pdev, 1); fb_size = SAVAGE_FB_SIZE_S4; - aper_rsrc = 1; aperture_base = fb_base + SAVAGE_APERTURE_OFFSET; /* this should always be true */ if (pci_resource_len(dev->pdev, 1) == 0x08000000) { @@ -626,10 +617,8 @@ int savage_driver_firstopen(struct drm_device *dev) } } else { mmio_base = pci_resource_start(dev->pdev, 0); - fb_rsrc = 1; fb_base = pci_resource_start(dev->pdev, 1); fb_size = pci_resource_len(dev->pdev, 1); - aper_rsrc = 2; aperture_base = pci_resource_start(dev->pdev, 2); /* Automatic MTRR setup will do the right thing. */ }
The comment about them (also removed) says: /* fb_rsrc and aper_rsrc aren't really used currently, but still exist * in case we decide we need information on the BAR for BSD in the * future. */ Well that was written 12 years ago in 2008. We are now in the future and they are still superfluous. We can always add them again at a later date if they are ever required. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/savage/savage_bci.c: In function ‘savage_driver_firstopen’: drivers/gpu/drm/savage/savage_bci.c:580:24: warning: variable ‘aper_rsrc’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/savage/savage_bci.c:580:15: warning: variable ‘fb_rsrc’ set but not used [-Wunused-but-set-variable] Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/gpu/drm/savage/savage_bci.c | 11 ----------- 1 file changed, 11 deletions(-)