From: Yihao Han Date: Fri, 8 Apr 2022 08:12:37 +0000 (-0700) Subject: scsi: fcoe: Simplify if-if to if-else X-Git-Tag: baikal/mips/sdk6.1~5690^2~144 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=5844fcd5c174fb9b319e56bdceef34c06f7ac226;p=kernel.git scsi: fcoe: Simplify if-if to if-else Replace 'if (!is_zero_ether_addr(mac))' with 'else' for simplification and add curly brackets according to the kernel coding style: "Do not unnecessarily use braces where a single statement will do." ... "This does not apply if only one branch of a conditional statement is a single statement; in the latter case use braces in both branches" Please refer to: https://www.kernel.org/doc/html/v5.17-rc8/process/coding-style.html Link: https://lore.kernel.org/r/20220408081237.14037-1-hanyihao@vivo.com Signed-off-by: Yihao Han Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 44ca6110213ca..983e00135feac 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2580,7 +2580,7 @@ static void fcoe_flogi_resp(struct fc_seq *seq, struct fc_frame *fp, void *arg) /* pre-FIP */ if (is_zero_ether_addr(mac)) fcoe_ctlr_recv_flogi(fip, lport, fp); - if (!is_zero_ether_addr(mac)) + else fcoe_update_src_mac(lport, mac); done: fc_lport_flogi_resp(seq, fp, lport);