From patchwork Fri Apr 8 08:12:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yihao Han X-Patchwork-Id: 559398 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BB16C433F5 for ; Fri, 8 Apr 2022 08:18:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231556AbiDHIU6 (ORCPT ); Fri, 8 Apr 2022 04:20:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231479AbiDHIUu (ORCPT ); Fri, 8 Apr 2022 04:20:50 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2094.outbound.protection.outlook.com [40.107.255.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C847716E3; Fri, 8 Apr 2022 01:18:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k6VxNlGT9Usmyp6017tSnvfF7RSHczKCWamZ0mk8q8f6YYQkmSjOCtICdE2Q2jiKCTDfCfurVBqG/agSYD9WYw0vjbUFFW5AE09IjjPzG82QqusCOQeUZ8NVDXvpTGAdHcHXNu8a5T7JxrQhuN/LpnX9VhuXn8fjrXikrS2KysndhvaXoEvUwy+P1ixB0hACtH6OCjEpeETKURHmWnVSFY05s1E2AZgu9lsn6Vd0RkhO2cwvH4j7zTQuLtU7HsZcqq2yFWaMc1Jwgn5B90GRwvjWQH+8yPzu8N3b1MnclGKg9+Ibblyp0Xq2hqZTm4gTrxcofCHZOBpEg0b0QG7pUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WYD3s6Q7mX9W7qFsDHMv/eywa9RGFZbtte2pDQaAm6s=; b=mhYujJAyJSDLWiu+xXJY4nyhT+4dkhv0HgihG2xgF01g3PhjlnikqPJQL1JE7nuEH/pqQFkPpYpEl2uYewUscV5/wLhS59Fnf/BtUJBAWaMPmd8shFnsSIKF9TRGDNOHWcruiE4eMw/NFkGBZb4+MA0jGdneWwdo9Iq9+GhAPf54WH1CKIFeZAcasfyGiVDtUKrRecJs9CIUOpzWyxNd8gpUxkbrvbRAIkTloiN2jr0YQ4U2TogzNTYi+jJohPcV9oFvAc314B/6WLqDaJnxWnCU7Y85cD3346f0GoC/aFBI7r+oxXhCxl9ytoblH2gQtOH4RStx2csBHI58fewPGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WYD3s6Q7mX9W7qFsDHMv/eywa9RGFZbtte2pDQaAm6s=; b=Jfb8IzYYNDdvQElFzX3/XZZmT3HKHZhCdqGfzFJa2eoMOPNt6tQEDpnHJBYosQonk5j7PsOTKq8xM1S6cySm3AEgzEmV6rO7ilyReiBdduAQCheTdkL9kjQt8Lg5mN9axCsipF3otmdtX5syaIQAnGdeI7Xep2AQYl2dtl9KdPc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB4173.apcprd06.prod.outlook.com (2603:1096:400:26::14) by KL1PR0601MB4499.apcprd06.prod.outlook.com (2603:1096:820:72::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.25; Fri, 8 Apr 2022 08:18:38 +0000 Received: from TYZPR06MB4173.apcprd06.prod.outlook.com ([fe80::2813:af2f:32d0:7be]) by TYZPR06MB4173.apcprd06.prod.outlook.com ([fe80::2813:af2f:32d0:7be%9]) with mapi id 15.20.5144.022; Fri, 8 Apr 2022 08:18:37 +0000 From: Yihao Han To: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@vivo.com, Yihao Han Subject: [PATCH] scsi: fcoe: simplify if-if to if-else Date: Fri, 8 Apr 2022 01:12:37 -0700 Message-Id: <20220408081237.14037-1-hanyihao@vivo.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: HK0PR01CA0055.apcprd01.prod.exchangelabs.com (2603:1096:203:a6::19) To TYZPR06MB4173.apcprd06.prod.outlook.com (2603:1096:400:26::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46edba7e-ea77-411a-8e73-08da193861a1 X-MS-TrafficTypeDiagnostic: KL1PR0601MB4499:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x7GpC+zkOFt2MAXSBCDbWKMkZIblVzlEDnabZ2r7E9uzm4IVvQ5F3w3igtuW5dClQMrA/oqDidKEXBQUcjUBPA7emJN6ebAL+JDN0TyU8kljtd3BjFM5moj5TbCA9Vtma8CsmWlahLdr8DO7a7fc5o+gcrsaH17L8w2JX5O0qWXTTA43245YtGJ3qtKxOBS4gpl8BDrUuF84jmz0Ll3Up0yHj1tEVKtf1rdgWI0e3PeWWweQV6AdvSH63c1oHQECAbQ+apkxkPNDYrMXLrpAsYN0Tuqu8YAag7XbfV7N5HSHJjKUt5F0OjTujQQ533ZUk8yc9cV5NV3D6H4l+gVwf4sU+awhFgCnmQK0jgeIIM14Ypj1C1wCLdJuORYCrKkcZIiXwUaVb3ETWKX7RDC7GDAm7fxDnHlYHO2Lvg6yP41i8txPmAmZR6+DEJnHrB9BDZ8tKtgtdEcR+NFPLdHdXs6LN6aCNhsgJXfvFFoTVFnfEwQcSKLOesoBjB2Y540HUb1asFc/SrWXFpHVxlto10fniYL1GB8DyNz/nXotYeLLqXGJZfHI6l3NLOJdUGbl6jXjeutJA9hraAbm6tZtn5fVuPMizTrqgR6KjteU18ELz6SkUPI6uNltRaTX+Hl69ZWiAiBAXJoSArmLDTbp4Krtqu2qad9Di09Mg5axsBEkY/2bpLA0P7eUrygK0iYS+M94/wE5HfF7n3RsIrsGZUblk8eiGlDM2vzdn5BPjoT1haUKdLsjK0LY55QDdYEjbTkkZP690UR4Fn1RTnDXMuclxjYQuqItbCEBvYE9wik= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR06MB4173.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(6506007)(66476007)(66556008)(66946007)(8676002)(4326008)(6512007)(86362001)(52116002)(2616005)(316002)(1076003)(8936002)(107886003)(508600001)(5660300002)(110136005)(38100700002)(38350700002)(186003)(26005)(2906002)(83380400001)(36756003)(6486002)(966005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9hIIbnRUWIvANOMbSA9VaubEEor8aCffYNdfJEhvPh1LBLlYmIYwftwuLvRG7ylkPXPw4p69pwi0ymVnLpG2SF+mcN2q/A3GpdjzxBaRCbv6OXKBYSSKaPrmT1FzbsXiTakR8Pt2FLzY/obUtqOD3V2SC46jUSzbh+YLoCByn1PCnEjMwI3pKDu12N0PxFtODGZ7y4iw4d2tP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2jfDaS3qNg3stsZY7NWVqAU9kQnvvL8RKXtkwgy8J9v2OWO1igbqHm5IDvFkGfLZdIWsbw5j9PHjd+toTxJHvlPqLvkqBJSk9SYofco8Nw5uuZlGT0CztSOVmzXbjOlq76eEU6zX9nBulhy1wU2S9KUY6DlG1s2J4xcxVpg1yX0opNQkQF6EDzjTpvu53JFBf4YyuyGZ052Q0a3xq28cGC2N56cCigJliEOaUO9TudmkEx+9PpG5STVyuJAmr46cHg2a5n8Ee4UQ9HLYZher5R+CGjybkZaEwMfiHKokv2o6T0d+dm1xDoO/3AMPeZ7nruazSUz6oSxNp9zqYnRD7lcS/JFcZDFn2lfFhuXkdjq1mO6qPUyhwgRf/7WLESojFA4BokYCPJmEhxonFFjdo+0q49Tp+XLsNOtdTFA1cirQq/h4kDgIGJCtTk2rVA1KpDjKp1N1gsOw== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46edba7e-ea77-411a-8e73-08da193861a1 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB4173.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 08:18:37.4748 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OfcgoIf2zGtfMDlKnKoqiZV82m/oBZghSDnQufcaQ5FKgFktq0K1pQbdwu3UpRdOwLIg4HcQIHq99s+WoYIQEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4499 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 Signed-off-by: Yihao Han --- drivers/scsi/fcoe/fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 44ca6110213c..983e00135fea 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);