lkml.org 
[lkml]   [2013]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 01/22] PCI, acpiphp: Add is_hotplug_bridge detection
From
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


\
 
 \ /
  Last update: 2013-01-15 08:43    [W:0.234 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site