summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-09-24 21:14:57 (GMT)
committerBjorn Helgaas <bhelgaas@google.com>2013-09-25 21:43:58 (GMT)
commit77a0dfcd8a4d9a93a21c8be56eaeb65cd69b351d (patch)
tree78fc61e77d3976560185ac61c7944755a7009502 /include
parent2ba29e270e977b213a7d58ae1152c23a1c3074a3 (diff)
downloadlinux-77a0dfcd8a4d9a93a21c8be56eaeb65cd69b351d.tar.xz
PCI: Document reason for using pci_is_root_bus()
Some code assumes "bus->self == NULL" means the bus is a root bus. This adds a comment explaining why this is incorrect ("virtual" buses added for SR-IOV have "bus->self == NULL" but are not root buses). No functional change. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 197e2d2..d3a888a 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -470,6 +470,10 @@ struct pci_bus {
/*
* Returns true if the pci bus is root (behind host-pci bridge),
* false otherwise
+ *
+ * Some code assumes that "bus->self == NULL" means that bus is a root bus.
+ * This is incorrect because "virtual" buses added for SR-IOV (via
+ * virtfn_add_bus()) have "bus->self == NULL" but are not root buses.
*/
static inline bool pci_is_root_bus(struct pci_bus *pbus)
{