Re: [PATCH net-next v6 07/11] net/smc: register loopback-ism into SMC-D device list

Wenjia Zhang
2024-04-26T08:04:46Z

On 25.04.24 15:29, Alexandra Winter wrote:
>
>
> On 25.04.24 13:29, Wenjia Zhang wrote:
>>> +    if (!smcd->pnetid[0]) {
>>> +        fentry = list_first_entry_or_null(&smcd_dev_list.list,
>>> +                          struct smcd_dev, list);
>>> +        if (fentry && smc_ism_is_loopback(fentry))
>>> +            list_add(&smcd->list, &fentry->list);
>>> +        else
>>> +            list_add(&smcd->list, &smcd_dev_list.list);
>>> +    } else {
>>>           list_add_tail(&smcd->list, &smcd_dev_list.list);
>>> -    else
>>> -        list_add(&smcd->list, &smcd_dev_list.list);
>>> +    }
>>
>> Nit: here the pair of curly brackets are unnecessary.
>
> Actually
> https://www.kernel.org/doc/html/latest/process/coding-style.html#codingstyle
> tells you to use those braces.
Thanks, @Alexandra!
Then @Wen, forget my comments on this pls!