Skip to contentSkip to conversation

frv: replace now removed pci_bus_b() causing build failure

PATCH In review Paul Gortmaker 3 participants 3 messages Feb 20, 2014 – Feb 21, 2014 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 frv: replace now removed pci_bus_b() causing build failure

In commit 94e6a9b93064b49024b8701d2d81fcb4a821fa09 ("PCI: Remove pci_bus_b() and use list_for_each_entry() directly") the function pci_bus_b() was removed, but one instance of its usage was missed.

Replace it in the same fashion that the original commit did.

Cc Yijing Wang <[email protected]>
Cc Bjorn Helgaas <[email protected]>

---

[Note: commit ID referenced above is from linux-next and will
be invalid if the PCI-next content is ever rebased.]

 arch/frv/mb93090-mb00/pci-frv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/frv/mb93090-mb00/pci-frv.c +1 -1
index c28121765448..67b1d1685759 100644
@@ -88,7 +88,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
 
 	/* Depth-First Search on bus tree */
 	for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
-		bus = pci_bus_b(ln);
+		bus = list_entry(ln, struct pci_bus, node);
 		if ((dev = bus->self)) {
 			for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
 				r = &dev->resource[idx];
Signature · 1 line
1.8.5.2
maintainer
#1 lore raw

[+cc linux-pci]

Quoted 9 lines · Paul Gortmaker

In commit 94e6a9b93064b49024b8701d2d81fcb4a821fa09 ("PCI: Remove pci_bus_b() and use list_for_each_entry() directly") the function pci_bus_b() was removed, but one instance of its usage was missed.

Replace it in the same fashion that the original commit did.

Cc Yijing Wang <[email protected]>
Cc Bjorn Helgaas <[email protected]>

Crap, sorry about that. I added this to my pci/list-for-each-entry branch for v3.15.

Quoted 24 lines

---

[Note: commit ID referenced above is from linux-next and will
be invalid if the PCI-next content is ever rebased.]

 arch/frv/mb93090-mb00/pci-frv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/frv/mb93090-mb00/pci-frv.c +1 -2
index c28121765448..67b1d1685759 100644
@@ -88,7 +88,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
 
        /* Depth-First Search on bus tree */
        for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
-               bus = pci_bus_b(ln);
+               bus = list_entry(ln, struct pci_bus, node);
                if ((dev = bus->self)) {
                        for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
                                r = &dev->resource[idx];
--

1.8.5.2

#2 lore raw
In reply to Paul Gortmaker

Oh, I'm sorry, Paul,thanks for your patch to correct this.

Quoted 31 lines · Paul Gortmaker

In commit 94e6a9b93064b49024b8701d2d81fcb4a821fa09 ("PCI: Remove pci_bus_b() and use list_for_each_entry() directly") the function pci_bus_b() was removed, but one instance of its usage was missed.

Replace it in the same fashion that the original commit did.

Cc Yijing Wang <[email protected]>
Cc Bjorn Helgaas <[email protected]>

---

[Note: commit ID referenced above is from linux-next and will
be invalid if the PCI-next content is ever rebased.]

 arch/frv/mb93090-mb00/pci-frv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/frv/mb93090-mb00/pci-frv.c +1 -1
index c28121765448..67b1d1685759 100644
@@ -88,7 +88,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
 
 	/* Depth-First Search on bus tree */
 	for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
-		bus = pci_bus_b(ln);
+		bus = list_entry(ln, struct pci_bus, node);
 		if ((dev = bus->self)) {
 			for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
 				r = &dev->resource[idx];
Signature · 2 lines
Thanks!
Yijing