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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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!




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux