[PATCH 1/6] PCI, acpiphp: Use list_for_each_entry() for bus traversal (original) (raw)

Rafael J. Wysocki rjw at rjwysocki.net
Thu Feb 13 15:54:46 PST 2014


On Thursday, February 13, 2014 09:13:58 PM Yijing Wang wrote:

Replace listforeach() + pcibusb() with the simpler listforeachentry().

Signed-off-by: Yijing Wang <wangyijing at huawei.com>

Looks reasonable to me.

Does it conflict with anything currently in linux-next (the linux-next branch of linux-pm.git in particular)?

--- drivers/pci/hotplug/acpiphpglue.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphpglue.c b/drivers/pci/hotplug/acpiphpglue.c index cd929ae..aee6a0a 100644 --- a/drivers/pci/hotplug/acpiphpglue.c +++ b/drivers/pci/hotplug/acpiphpglue.c @@ -450,7 +450,7 @@ static void cleanupbridge(struct acpiphpbridge *bridge) */ static unsigned char acpiphpmaxbusnr(struct pcibus *bus) { - struct listhead *tmp; + struct pcibus *tmp; unsigned char max, n; /* @@ -463,8 +463,8 @@ static unsigned char acpiphpmaxbusnr(struct pcibus *bus) */ max = bus->busnres.start; - listforeach(tmp, &bus->children) { - n = pcibusmaxbusnr(pcibusb(tmp)); + listforeachentry(tmp, &bus->children, node) { + n = pcibusmaxbusnr(tmp); if (n > max) max = n; }

-- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.



More information about the dri-devel mailing list