ARM/PCI: Use list_for_each_entry() for bus traversal
authorYijing Wang <wangyijing@huawei.com>
Thu, 13 Feb 2014 13:13:59 +0000 (21:13 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 14 Feb 2014 18:20:50 +0000 (11:20 -0700)
Replace list_for_each() + pci_bus_b() with list_for_each_entry().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/bios32.c

index 317da88ae65b14f2bdd9145a3b552316f134c18a..004670e97ca88c7136b217679733067464e87768 100644 (file)
@@ -57,13 +57,10 @@ static void pcibios_bus_report_status(struct pci_bus *bus, u_int status_mask, in
 
 void pcibios_report_status(u_int status_mask, int warn)
 {
-       struct list_head *l;
-
-       list_for_each(l, &pci_root_buses) {
-               struct pci_bus *bus = pci_bus_b(l);
+       struct pci_bus *bus;
 
+       list_for_each_entry(bus, &pci_root_buses, node)
                pcibios_bus_report_status(bus, status_mask, warn);
-       }
 }
 
 /*