Re: [BK PATCH] PCI and PCI Hotplug changes and fixes for 2.5.70

From: Dave Jones (
Date: Thu Jun 05 2003 - 03:59:38 EST

On Thu, Jun 05, 2003 at 01:49:33AM -0700, Greg KH wrote:

> > - pci_for_each_dev(device)
> > + while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL)
> >
> > when you could have just added whatever locking pci_find_device() does
> > to pci_for_each_dev() You'd then not have had to touch any of these
> > drivers, and it'd look a damn sight better to look at IMO.
> pci_for_each_dev() is currently a macro, not a function, and I'm trying
> to get rid of all public access to the pci lists. The majority of pci
> drivers use the pci_find_device() function in just the way that I
> converted the few remaining users of pci_for_each_dev() to (yeah, "few"
> is a relative number, but check out how many people call
> pci_find_device()...)
> I guess I could create this to clean it up a bit:
> #define pci_find_all_devices(dev) pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)
> but that's really not that much of a change...

so why not..

#define pci_for_each_dev(dev) \
        while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL)


Seems to be the same change you made tree-wide, with minimal
interruption to drivers.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:26 EST