linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] PCI: use pci_is_root_bus() to check whether it is a root bus
@ 2013-09-06  1:45 Wei Yang
  2013-09-06  1:45 ` [PATCH 2/3] PCI: Use spec name for the comment of PCIe capability field Wei Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Wei Yang @ 2013-09-06  1:45 UTC (permalink / raw)
  To: bhelgaas, linux-pci; +Cc: Wei Yang

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.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
 drivers/pci/setup-bus.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 520210f..989de3c 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1134,7 +1134,7 @@ void __ref __pci_bus_size_bridges(struct pci_bus *bus,
 	}
 
 	/* The root bus? */
-	if (!bus->self)
+	if (pci_is_root_bus(bus))
 		return;
 
 	switch (bus->self->class >> 8) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-09-11  0:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-06  1:45 [PATCH 1/3] PCI: use pci_is_root_bus() to check whether it is a root bus Wei Yang
2013-09-06  1:45 ` [PATCH 2/3] PCI: Use spec name for the comment of PCIe capability field Wei Yang
2013-09-06 23:12   ` Bjorn Helgaas
2013-09-09  2:10     ` Wei Yang
2013-09-06  1:45 ` [PATCH 3/3] PCI: Pass full info for window alignment Wei Yang
2013-09-06 23:19   ` Bjorn Helgaas
2013-09-06 23:09 ` [PATCH 1/3] PCI: use pci_is_root_bus() to check whether it is a root bus Bjorn Helgaas
2013-09-09  2:14   ` Wei Yang
2013-09-09  7:00   ` Wei Yang
2013-09-09 16:15     ` Bjorn Helgaas
2013-09-10  7:46       ` Wei Yang
2013-09-10 10:24         ` Benjamin Herrenschmidt
2013-09-11  0:45           ` Wei Yang
     [not found]   ` <CA+C+4OYxqgExkepUix5wU4VPRRUcnAFPQJcbUYcLHRcAmNgqgw@mail.gmail.com>
2013-09-09 16:10     ` Alex Chiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).