Skip to content

Commit

Permalink
MIPS: PCI: use list_for_each_entry() for bus->devices traversal
Browse files Browse the repository at this point in the history
Replace open-coded list traversal with list_for_each_entry().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3200/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Bjorn Helgaas authored and Ralf Baechle committed Feb 20, 2012
1 parent 43ca495 commit f79eaeb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
5 changes: 1 addition & 4 deletions arch/mips/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,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 &&
Expand All @@ -288,9 +287,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);
}
Expand Down
10 changes: 0 additions & 10 deletions arch/mips/pmc-sierra/yosemite/ht-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit f79eaeb

Please sign in to comment.