Re: [PATCH] pci: get rid of sparse warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, September 5, 2008 9:45 pm Stephen Hemminger wrote:
> 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@xxxxxxxxxx>
>
> --- a/drivers/pci/remove.c	2008-09-05 08:31:38.000000000 -0700
> +++ b/drivers/pci/remove.c	2008-09-05 08:32:15.000000000 -0700
> @@ -114,13 +114,9 @@ void pci_remove_behind_bridge(struct pci
>  {
>  	struct list_head *l, *n;
>
> -	if (dev->subordinate) {
> -		list_for_each_safe(l, n, &dev->subordinate->devices) {
> -			struct pci_dev *dev = pci_dev_b(l);
> -
> -			pci_remove_bus_device(dev);
> -		}
> -	}
> +	if (dev->subordinate)
> +		list_for_each_safe(l, n, &dev->subordinate->devices)
> +			pci_remove_bus_device(pci_dev_b(l));
>  }
>
>  static void pci_stop_bus_devices(struct pci_bus *bus)

Applied to linux-next (though w/o the specific sparse warning, hopefully the 
changelog is clear enough).

Jesse
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux