Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 2/6] MIPS: PCI: use list_for_each_entry() for bus->devices traversal
       [not found] <20111216223043.5963.87534.stgit@bhelgaas.mtv.corp.google.com>
@ 2011-12-16 22:31 ` Bjorn Helgaas
  2012-01-16 16:25   ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2011-12-16 22:31 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: linux-pci, Ralf Baechle, linux-mips

Replace open-coded list traversal with list_for_each_entry().

CC: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/mips/pci/pci.c                    |    5 +----
 arch/mips/pmc-sierra/yosemite/ht-irq.c |   10 ----------
 2 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 934862c..ae5e423 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -273,7 +273,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
 {
 	/* Propagate hose info into the subordinate devices.  */
 
-	struct list_head *ln;
 	struct pci_dev *dev = bus->self;
 
 	if (pci_probe_only && dev &&
@@ -282,9 +281,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
 		pcibios_fixup_device_resources(dev, bus);
 	}
 
-	for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
-		dev = pci_dev_b(ln);
-
+	list_for_each_entry(dev, &bus->devices, bus_list) {
 		if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
 			pcibios_fixup_device_resources(dev, bus);
 	}
diff --git a/arch/mips/pmc-sierra/yosemite/ht-irq.c b/arch/mips/pmc-sierra/yosemite/ht-irq.c
index 86b98e9..62ead66 100644
--- a/arch/mips/pmc-sierra/yosemite/ht-irq.c
+++ b/arch/mips/pmc-sierra/yosemite/ht-irq.c
@@ -35,16 +35,6 @@
  */
 void __init titan_ht_pcibios_fixup_bus(struct pci_bus *bus)
 {
-	struct pci_bus *current_bus = bus;
-	struct pci_dev *devices;
-	struct list_head *devices_link;
-
-	list_for_each(devices_link, &(current_bus->devices)) {
-		devices = pci_dev_b(devices_link);
-		if (devices == NULL)
-			continue;
-	}
-
 	/*
 	 * PLX and SPKT related changes go here
 	 */

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

* Re: [PATCH 2/6] MIPS: PCI: use list_for_each_entry() for bus->devices traversal
  2011-12-16 22:31 ` [PATCH 2/6] MIPS: PCI: use list_for_each_entry() for bus->devices traversal Bjorn Helgaas
@ 2012-01-16 16:25   ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2012-01-16 16:25 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Jesse Barnes, linux-pci, linux-mips

Thanks, applied.

  Ralf

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

end of thread, other threads:[~2012-01-16 16:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20111216223043.5963.87534.stgit@bhelgaas.mtv.corp.google.com>
2011-12-16 22:31 ` [PATCH 2/6] MIPS: PCI: use list_for_each_entry() for bus->devices traversal Bjorn Helgaas
2012-01-16 16:25   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox