Resending because the first mail got rejected by vger. On Fri, Sep 6, 2013 at 4:09 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: > > [+cc Kenji, Alex] > > On Fri, Sep 06, 2013 at 09:45:56AM +0800, Wei Yang wrote: > > In __pci_bus_size_bridges() we check whether a pci bus is a root > > bus by testing bus->self. As indicated by commit 79af72d7 > > ("PCI: pci_is_root_bus helper"), bus->self == NULL is not a proper > > way to check the pci root bus. > > > > This patch changes it to pci_is_root_bus() to check whether it is > > a root bus. > > I think this is a good change, even if only on the grounds of > consistency. > > Did you trip over a case where a root bus has bus->self != NULL? > I'd like to know more details about the case where: > > (bus->parent == NULL) && (bus->self != NULL) > > I'm sure that situation exists, or Kenji and Alex would not have > made the change in 79af72d7, but I don't know the details. > > I'd like to know the details so I can recognize similar problems > elsewhere. It has been quite a long time, and so I had to google around in the archives to try and remind myself why we made this change. Unfortunately, I couldn't find anything public... Reaching back into my unreliable human memory though, I truly seem to recall that this interface was created out of paranoia/future-proofing and not because we had tripped over any actual issues we had found in the wild at that time. Sorry for not being more helpful. /ac -- 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