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

Alexandra Winter
2024-04-25T13:29:16Z

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.