linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] PCI,acpiphp: Use list_for_each_entry() for bus traversal
@ 2014-02-13 13:13 Yijing Wang
  2014-02-13 13:13 ` [PATCH 2/6] PCI/arm: " Yijing Wang
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Yijing Wang @ 2014-02-13 13:13 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Russell King, David Airlie, linux-pcmcia, Hanjun Guo, dri-devel,
	linux-pci, Yijing Wang, linuxppc-dev

Replace list_for_each() + pci_bus_b() with the simpler
list_for_each_entry().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
 drivers/pci/hotplug/acpiphp_glue.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index cd929ae..aee6a0a 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -450,7 +450,7 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
  */
 static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
 {
-	struct list_head *tmp;
+	struct pci_bus *tmp;
 	unsigned char max, n;
 
 	/*
@@ -463,8 +463,8 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
 	 */
 	max = bus->busn_res.start;
 
-	list_for_each(tmp, &bus->children) {
-		n = pci_bus_max_busnr(pci_bus_b(tmp));
+	list_for_each_entry(tmp, &bus->children, node) {
+		n = pci_bus_max_busnr(tmp);
 		if (n > max)
 			max = n;
 	}
-- 
1.7.1

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

end of thread, other threads:[~2014-02-15  0:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13 13:13 [PATCH 1/6] PCI,acpiphp: Use list_for_each_entry() for bus traversal Yijing Wang
2014-02-13 13:13 ` [PATCH 2/6] PCI/arm: " Yijing Wang
2014-02-13 14:46   ` Russell King - ARM Linux
2014-02-13 13:14 ` [PATCH 3/6] PCI/drm: " Yijing Wang
2014-02-13 13:14 ` [PATCH 4/6] PCI/powerpc: " Yijing Wang
2014-02-13 13:14 ` [PATCH 5/6] PCI/pcmcia: " Yijing Wang
2014-02-13 13:14 ` [PATCH 6/6] PCI: Remove pci_bus_b() and use list_entry() directly Yijing Wang
2014-02-13 23:54 ` [PATCH 1/6] PCI, acpiphp: Use list_for_each_entry() for bus traversal Rafael J. Wysocki
2014-02-14  2:19   ` Yijing Wang
2014-02-14 13:39     ` Rafael J. Wysocki
2014-02-15  0:49       ` Yijing Wang
2014-02-14 18:23 ` [PATCH 1/6] PCI,acpiphp: " Bjorn Helgaas
2014-02-15  0:52   ` [PATCH 1/6] PCI, acpiphp: " Yijing Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).