Skip to contentSkip to conversation

drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init

PATCH Applied Ye Bin 2 participants 2 messages Jan 23, 2021 – Feb 3, 2021

Subsystems (3)
lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init

Fix follow warning:
drivers/gpu/drm/nouveau/nouveau_bios.c:2086:18: warning: variable ‘pdev’ set but not used [-Wunused-but-set-variable]

  struct pci_dev *pdev;
                  ^~~~
---
 drivers/gpu/drm/nouveau/nouveau_bios.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_bios.c +0 -2
index 7cc683b8dc7a..e8c445eb1100 100644
@@ -2083,13 +2083,11 @@ nouveau_bios_init(struct drm_device *dev)
 {
 	struct nouveau_drm *drm = nouveau_drm(dev);
 	struct nvbios *bios = &drm->vbios;
-	struct pci_dev *pdev;
 	int ret;
 
 	/* only relevant for PCI devices */
 	if (!dev_is_pci(dev->dev))
 		return 0;
-	pdev = to_pci_dev(dev->dev);
 
 	if (!NVInitVBIOS(dev))
 		return -ENODEV;
Signature · 1 line
2.25.4
maintainer Applied
#1 lore raw

Applied to drm-misc-next. Thanks for the patch!

Am 23.01.21 um 02:30 schrieb Ye Bin:

Quoted 30 lines

Fix follow warning:
drivers/gpu/drm/nouveau/nouveau_bios.c:2086:18: warning: variable ‘pdev’ set but not used [-Wunused-but-set-variable]

   struct pci_dev *pdev;
                   ^~~~
---
  drivers/gpu/drm/nouveau/nouveau_bios.c | 2 --
  1 file changed, 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_bios.c +0 -2
index 7cc683b8dc7a..e8c445eb1100 100644
@@ -2083,13 +2083,11 @@ nouveau_bios_init(struct drm_device *dev)
  {
  	struct nouveau_drm *drm = nouveau_drm(dev);
  	struct nvbios *bios = &drm->vbios;
-	struct pci_dev *pdev;
  	int ret;
 
  	/* only relevant for PCI devices */
  	if (!dev_is_pci(dev->dev))
  		return 0;
-	pdev = to_pci_dev(dev->dev);
 
  	if (!NVInitVBIOS(dev))
  		return -ENODEV;
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau