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

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

 



* Stephen Hemminger <shemminger@xxxxxxxxxx>:
> Get rid of the second definition of dev which hides the
> earlier one in the argument list and causes a warning from sparse.

Would be nice to add to the changelog which warning we're getting
rid of.

Thanks.

/ac

> 
> 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)
> --
> 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
> 
--
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