Messages in this thread | | | Date | Mon, 14 Jan 2013 23:05:47 -0800 | Subject | Re: [PATCH v8 01/22] PCI, acpiphp: Add is_hotplug_bridge detection | From | Yinghai Lu <> |
| |
On Mon, Jan 14, 2013 at 10:45 PM, Yijing Wang <wangyijing@huawei.com> wrote: >> + list_for_each_entry(func, &slot->funcs, sibling) { >> + if (PCI_FUNC(dev->devfn) == func->function) { >> + /* check if this bridge has ejectable slots */ >> + if ((detect_ejectable_slots(func->handle) > 0)) >> + dev->is_hotplug_bridge = 1; >> + break; > > Hi Yinghai, > Need to put the "break" in parentheses of "if"? If the first func which device number == dev->devfn has't ejectable slot, > don't check the rest funcs whether have ejectable slots?
no, we should break when PCI_FUNC(dev->devfn) == func->function
that iteration is for find the func for dev.
Thanks
Yinghai
| |