Re: [RFC/RFT][PATCH v3 2/5] driver core: Functional dependencies tracking support

From: Rafael J. Wysocki
Date: Fri Sep 16 2016 - 08:06:16 EST


On Fri, Sep 16, 2016 at 9:53 AM, Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx> wrote:
> Hi Rafael,
>
>
> On 2016-09-16 00:06, Rafael J. Wysocki wrote:
>>
>> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>>

[cut]

>> +/**
>> + * device_links_no_driver - Update links of a device without a driver.
>> + * @dev: Device without a drvier.
>> + *
>> + * Delete all non-persistent links from this device to any suppliers.
>> + *
>> + * Persistent links stay around, but their status is changed to
>> "available",
>> + * unless they already are in the "supplier unbind in progress" state in
>> which
>> + * case they need not be updated.
>> + *
>> + * Links with the DEVICE_LINK_STATELESS flag set are ignored.
>> + */
>> +void device_links_no_driver(struct device *dev)
>> +{
>> + struct device_link *link, *ln;
>> +
>> + mutex_lock(&device_links_lock);
>> +
>> + list_for_each_entry_safe_reverse(link, ln,
>> &dev->links_to_suppliers, c_node)
>
>
> missing "{"
>
>> + if (link->flags & DEVICE_LINK_STATELESS)
>> + continue;
>> +
>> + if (link->flags & DEVICE_LINK_AUTOREMOVE) {
>> + __device_link_del(link);
>> + } else {
>> + spin_lock(&link->lock);
>> +
>> + if (link->status != DEVICE_LINK_SUPPLIER_UNBIND)
>> + link->status = DEVICE_LINK_AVAILABLE;
>> +
>> + spin_unlock(&link->lock);
>> + }
>
>
> missing "}"
>

Sorry for the breakage and thanks for the fix!

Rafael