Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: fix sparse warning in pci_remove_behind_bridge

Get rid of the second definition of dev which hides the earlier one in
the argument list and causes a warning from sparse.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Stephen Hemminger and committed by
Jesse Barnes
11d58742 50cbfa51

+3 -7
+3 -7
drivers/pci/remove.c
··· 115 115 { 116 116 struct list_head *l, *n; 117 117 118 - if (dev->subordinate) { 119 - list_for_each_safe(l, n, &dev->subordinate->devices) { 120 - struct pci_dev *dev = pci_dev_b(l); 121 - 122 - pci_remove_bus_device(dev); 123 - } 124 - } 118 + if (dev->subordinate) 119 + list_for_each_safe(l, n, &dev->subordinate->devices) 120 + pci_remove_bus_device(pci_dev_b(l)); 125 121 } 126 122 127 123 static void pci_stop_bus_devices(struct pci_bus *bus)