On Tue, Sep 25, 2012 at 9:23 AM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: > On Tue, Sep 25, 2012 at 2:26 AM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote: >> could remove pci_root_buses list. >> ... >> PCI: Add dummy bus_type for pci_host_bridge ... >> PCI: Add for_each_pci_host_bridge() and pci_get_next_host_bridge > > I'm not thrilled about adding a new iterator for all host bridges. > > The iterator design pattern does not work for collections that can > change over time. In this case, it looks like you're adding a safer > way to iterate through all host bridges we know about at this time. > But we still have the problem of the host bridge that's added > tomorrow. > > I'd prefer a design where the PCI core provides an interface that > means "call this function for every host bridge we know about now > *and* for every one that's added in the future." yes, that is the point to add pci_root_bridge_bus_type. We can register bus notifier on that. -Yinghai -- 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