powerpc/pci: convert to use for_each_pci_bridge() helper
PATCH 1/1 powerpc/pci: convert to use for_each_pci_bridge() helper
...which makes code slightly cleaner.
Requires: d43f59ce6c50 ("PCI: Add for_each_pci_bridge() helper")
--- arch/powerpc/kernel/pci-hotplug.c | 7 ++----- arch/powerpc/kernel/pci_of_scan.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-)
arch/powerpc/kernel/pci-hotplug.c +2 -5
@@ -134,11 +134,8 @@ void pci_hp_add_devices(struct pci_bus *bus)pcibios_setup_bus_devices (bus); max = bus->busn_res.start;for (pass =0 ; pass <2 ; pass++) { -list_for_each_entry (dev, &bus->devices, bus_list) { -if (pci_is_bridge (dev)) - max =pci_scan_bridge (bus, dev, - max, pass); - } +for_each_pci_bridge (dev, bus) + max =pci_scan_bridge (bus, dev, max, pass); } }pcibios_finish_adding_to_bus (bus);
arch/powerpc/kernel/pci_of_scan.c +2 -5
@@ -369,11 +369,8 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,pcibios_setup_bus_devices (bus);/* Now scan child busses */ -list_for_each_entry (dev, &bus->devices, bus_list) { -if (pci_is_bridge (dev)) { -of_scan_pci_bridge (dev); - } - } +for_each_pci_bridge (dev, bus) +of_scan_pci_bridge (dev); }/**
Signature · 1 line
2.14.2
Quoted 1 line · Andy Shevchenko
...which makes code slightly cleaner.
+Cc: Bjorn
Perhaps it makes sense to pass this through PCI if no one objects?
Quoted 51 lines
Requires:
d43f59ce6c50("PCI: Addfor_each_pci_bridge()helper")Signed-off-by Andy Shevchenko <[email protected]>--- arch/powerpc/kernel/pci-hotplug.c | 7 ++----- arch/powerpc/kernel/pci_of_scan.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-)arch/powerpc/kernel/pci-hotplug.c +2
-5@@ -134,11 +134,8 @@ void pci_hp_add_devices(struct pci_bus *bus)pcibios_setup_bus_devices (bus); max = bus->busn_res.start; for (pass = 0; pass < 2; pass++) { -list_for_each_entry (dev, &bus->devices, bus_list) { -if (pci_is_bridge (dev)) - max =pci_scan_bridge (bus, dev, - max, pass); - } + for_each_pci_bridge(dev, bus) + max = pci_scan_bridge(bus, dev, max,pass);
arch/powerpc/kernel/pci-hotplug.c +0
-0} }pcibios_finish_adding_to_bus (bus);arch/powerpc/kernel/pci_of_scan.c +2
-5@@ -369,11 +369,8 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,pcibios_setup_bus_devices (bus);/* Now scan child busses */ -list_for_each_entry (dev, &bus->devices, bus_list) { -if (pci_is_bridge (dev)) { -of_scan_pci_bridge (dev); - } - } +for_each_pci_bridge (dev, bus) +of_scan_pci_bridge (dev); }/**
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 6 lines · Andy Shevchenko
Quoted 1 line · Andy Shevchenko
...which makes code slightly cleaner.
+Cc: Bjorn
Perhaps it makes sense to pass this through PCI if no one objects?
Fine with me, but I only apply things that appear on the [email protected] mailing list.
Quoted 54 lines
Quoted 49 lines
Requires:
d43f59ce6c50("PCI: Addfor_each_pci_bridge()helper")Signed-off-by Andy Shevchenko <[email protected]>--- arch/powerpc/kernel/pci-hotplug.c | 7 ++----- arch/powerpc/kernel/pci_of_scan.c | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-)arch/powerpc/kernel/pci-hotplug.c +2
-5@@ -134,11 +134,8 @@ void pci_hp_add_devices(struct pci_bus *bus)pcibios_setup_bus_devices (bus); max = bus->busn_res.start; for (pass = 0; pass < 2; pass++) { -list_for_each_entry (dev, &bus->devices, bus_list) { -if (pci_is_bridge (dev)) - max =pci_scan_bridge (bus, dev, - max, pass); - } + for_each_pci_bridge(dev, bus) + max = pci_scan_bridge(bus, dev, max,pass); } } pcibios_finish_adding_to_bus(bus);arch/powerpc/kernel/pci_of_scan.c +2
-5@@ -369,11 +369,8 @@ static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,pcibios_setup_bus_devices (bus);/* Now scan child busses */ -list_for_each_entry (dev, &bus->devices, bus_list) { -if (pci_is_bridge (dev)) { -of_scan_pci_bridge (dev); - } - } +for_each_pci_bridge (dev, bus) +of_scan_pci_bridge (dev); }Quoted 1 line
/**
--
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 11 lines · Bjorn Helgaas
Quoted 6 lines · Andy Shevchenko
Quoted 1 line · Andy Shevchenko
...which makes code slightly cleaner.
+Cc: Bjorn
Perhaps it makes sense to pass this through PCI if no one objects?
Fine with me, but I only apply things that appear on the [email protected] mailing list.
I want to wait for powerpc maintainers to Ack and then I'll resend.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Bjorn Helgaas
Quoted 3 lines · Andy Shevchenko
Quoted 1 line · Andy Shevchenko
...which makes code slightly cleaner.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
+Cc: Bjorn
Perhaps it makes sense to pass this through PCI if no one objects?
Fine with me, but I only apply things that appear on the [email protected] mailing list.
I want to wait for powerpc maintainers to Ack and then I'll resend.
Michael, Paul, Benjamin, do you have any concerns on this patch?
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Andy Shevchenko
Quoted 7 lines · Bjorn Helgaas
Quoted 5 lines · Andy Shevchenko
Quoted 1 line · Andy Shevchenko
...which makes code slightly cleaner.
+Cc: Bjorn
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Perhaps it makes sense to pass this through PCI if no one objects?
Fine with me, but I only apply things that appear on the [email protected] mailing list.
I want to wait for powerpc maintainers to Ack and then I'll resend.
Michael, Paul, Benjamin, do you have any concerns on this patch?
No, assuming it does what it says :)
cheers