On Thu, Jun 17, 2010 at 08:03:09PM +0900, Isaku Yamahata wrote:
This patch introduces foreachpci_in_bus() helper macro for depth first recursion. foreachpci() is for width first recursion. The macro will be used later to initialize pci bridge that requires depth first recursion.
Instead of introducing pci_next_in_bus(), can't we just use the existing pci_next() call? Something like:
#define foreachpci_in_bus(BDF, MAX, BUS) \ for (MAX=(BUS + 0x0100), BDF = BUS \ ; BDF >= 0 && BDF < (BUS + 0x0100) \ ; BDF = pci_next(BDF+1, &MAX))
-Kevin