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

Rafael J. Wysocki rjw at rjwysocki.net
Fri Feb 14 05:39:32 PST 2014


On Friday, February 14, 2014 10:19:41 AM Yijing Wang wrote:

On 2014/2/14 7:54, Rafael J. Wysocki wrote: > 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)?

Hi Rafael, I applied this to your linux-next branch successfully . No conflicts found.

Good. :-)

Please feel free to add my ACK to it.

Rafael

>> --- >> 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