Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp59007lfe; Fri, 15 Apr 2022 19:25:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOiHxDSLXy6pT6oOdsEo5AO+E78dKxYpYTxH0mayrodIZCDkPDyHtjwJgOg+2kf834QLnX X-Received: by 2002:a65:68d2:0:b0:39d:b709:fe3 with SMTP id k18-20020a6568d2000000b0039db7090fe3mr1376131pgt.382.1650075941100; Fri, 15 Apr 2022 19:25:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650075941; cv=pass; d=google.com; s=arc-20160816; b=pErRtysQzyrnIEchRyjtXEucu1PPlxXMN8fTrXZtiSjmfJKz1BVBEaFlK+4slinkBq wGDI+jh2J/iF7kMUpVWao38iZm8YLcML/OdsAizN6Uyxvp/Z+McAaMU8xmkRGMyoydVA Ws9wricFSSy2PzS3gIGXbcvUuVvXwu/z8rFN5PDjlRpX9U1BNZEajS5HrBf0xwj2FC+N JtlwA6bm7ktKJvMMF+aitAqjJ9o2yB+lU4SZqtBdqnph9HLFXpVcv0RJYhV0nV4WhD/1 8q9m/48qGEEDScqEqZgIUuxU4D7PXCLeFpqSUnQTxwv2nVz7zHlT9mEC3VpTS2GSlqZ3 RIeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=1ZY5wDb1CkjUVVVFsZxpSgk/70VpFE31iXuqrFpcIDk=; b=fiI8LmAszifKdlJhXWayfxUIkfnh7jmz7eAtEAUNaRohYes8ZX+Jq/4jWUdH9D8qL6 LaJB0tgczMRea6p6qtcd9VCh0uO5RYaxckrO202wl5+FjeTAd49UpQECZmX1MKoiX8da Yo99qIIZUtkpegDdFYGM3y+vjCHTbhebSt7TJPqwoG48DgWSinNIdbvp7Sxy/ZMzCDOx V/W+EDMxNlwCAke5Wk+sskahIzW38SfUmAbN+WmOWU+6HMAYeLv+fNSFr9zyGC8hK138 rZF/rf1O70IaY9TThuqFBAt55jjlkIdbmLLOBR9aC5eSk/32bakDGo/bFb9IiVBgjmAi wHMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=fq2dNk9I; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x18-20020a63db52000000b003817672f2d4si2892759pgi.316.2022.04.15.19.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:25:41 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo0.onmicrosoft.com header.s=selector2-vivo0-onmicrosoft-com header.b=fq2dNk9I; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8BEE8160470; Fri, 15 Apr 2022 18:37:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353096AbiDOMMj (ORCPT + 99 others); Fri, 15 Apr 2022 08:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353132AbiDOMMg (ORCPT ); Fri, 15 Apr 2022 08:12:36 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2117.outbound.protection.outlook.com [40.107.255.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90A435AA6C; Fri, 15 Apr 2022 05:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X/k50dhZGtvdJKkEBxbdPPSymNndfuX02fnCv98+8LH5GBTRFXQeATYf8cqx5Z10C+7PtSBJTAQRyHVXxSjOgbITTjOBHYJ5Kr0QkSL/qJQcDu2XHvTbbKWjd00gqcNyKNz5mBWPwlwHuETqI/ogRA/JkMeCRonqnyUbX4Z3PkBfB9tas5Mj3rtpmHVxMhNAnJj/KxyMYZofReH/NGFWyKXKwmrjDNHLklxGeoqjukVQTVQpLh91zl5UeGtBlBiazNuqx57td1Nn0Y56fQuUjKYKJpxBYHX7Fq4j7ElU/EGV7DFnBJ26J1q4gwC6srH44XYHQSEyeQjAzjx2ogURQg== 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=1ZY5wDb1CkjUVVVFsZxpSgk/70VpFE31iXuqrFpcIDk=; b=IDoBPVmoVyY8Jk1jdpt78Uhz8Tz+/tu5KC5CIa6NyYRFBU+h6TETZXENQhc0AGfcLSvfoDQ9DhK4uQ+/o4pGuiPKu5jil1sC66KcMCulGN3+w1VRMfAolFDdpVN6SnsPg8ljDWBMJqbivdbZETDj5ygzrDj4P3+yDNhXjPMZUUx8YnZ14iRbZqI7Z6w7pUvGPCHzRZiRA1e3iv3W2Iuy8az+W4NVcWsDRR+c7+hyFSF0h2AuarUPzo3/qRwapOJ7Qv5EHwpGqTbuTm/pUz4Gy7IGqr8nKw5bxGPoxFvbRbIdzZnFv4gIhKsSmShMwBAdVVRDCG1gHJ4IjwqMOwwqbQ== 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=1ZY5wDb1CkjUVVVFsZxpSgk/70VpFE31iXuqrFpcIDk=; b=fq2dNk9IkELSLxJkBzD31AgFrN9GAWcs8fjhBNnAYgyI7mzk+quMV5K0D7nzZ/lYy+lSvbrX4hi8b6obXHVJTyeZyRbLhBru5COpKOWX/OYTgFjB2vW3y6Fhd6ph/H/bpEr4q6URcJW48FhE7RNicEtvO7vfqPZ3biWvLY4pDv0= 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 SI2PR06MB4444.apcprd06.prod.outlook.com (2603:1096:4:15d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Fri, 15 Apr 2022 12:10:03 +0000 Received: from TYZPR06MB4173.apcprd06.prod.outlook.com ([fe80::d4bd:64f4:e1c0:25cb]) by TYZPR06MB4173.apcprd06.prod.outlook.com ([fe80::d4bd:64f4:e1c0:25cb%4]) with mapi id 15.20.5164.020; Fri, 15 Apr 2022 12:10:03 +0000 From: Yihao Han To: Shahed Shaikh , Manish Chopra , GR-Linux-NIC-Dev@marvell.com, "David S. Miller" , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@vivo.com, Yihao Han Subject: [PATCH v2] net: qlogic: qlcnic: simplify if-if to if-else Date: Fri, 15 Apr 2022 05:09:49 -0700 Message-Id: <20220415120949.86169-1-hanyihao@vivo.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: TY1PR01CA0192.jpnprd01.prod.outlook.com (2603:1096:403::22) 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: d6057960-55f2-4986-9525-08da1ed8df49 X-MS-TrafficTypeDiagnostic: SI2PR06MB4444: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: I8Q8RRiX8jXQGVb6SHHlAu36qWmd7NhSrYLY/m91GBbUFjP/f7OFWRfN6jjoEYc8nTLl1AvlHATUiYNx6lU4XcFfgKr/uENmJDMHStlbZxHG5hdLqbsCUdT43obKDNfWtLxhyZCfdirrXFc6gndvji0TclGrOjXL1LUqZTJ6lohm9wy8paOV1jg7TRRqZLvJXjAd3t44/GueO7hCoH10OLID0+WaUbZRxf1boB45Frfre/5c+c07maQIrhMsnqbMvi/5swFVx+2lvEstCINn+p3WzWnBN0B172hxicQH8XbZ/moaH9eu3f9uBKSbZIxdvEgemVuewd3vWDl8hP+8E2EcAo5D54bW3txXall5IdjZVq0bGwHXs1u7+JDkdkS6Qg0TBqrDMG61/3y2ZewJ9aJBbj0u/V7FaqoT8bbLtL+8mXGKTunFp1vU9aSw1RrvphCFZUWd3H7SV4kuBtCsi26ywHtsad+lxxl7vQDhfACpJErSnipmehSOmz4rRCP5uzaDREj4dRIy5/k+TqVl6I2pdKB+8+3CT+cRGzpUZzlAFKpYzwLIjc5meGIr0q2Ifohb5j0QnxFud+xcOUWYfWiDv3Iox7gg/Gzu9miuhg4P1lvNE+OuOeE3DgBrdGAJzLH3g/jYbvRG85gkFjj4J3kQ1eeuhaI0vZhinpsdI3xAn5NpJI7kURBOymFXr9gCZo6DZHevMnacb/hZXMfhThc/OuIezdr3PEueDlqR0xLmNdE8SGgZbFjvdW221qJfDuEpJH8w240YxAmci0ANxgbR7MJoLAulxBGNvzXzwjQ= 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)(8676002)(107886003)(6506007)(186003)(36756003)(83380400001)(1076003)(2906002)(2616005)(8936002)(6666004)(6512007)(52116002)(5660300002)(66476007)(26005)(66556008)(38350700002)(38100700002)(66946007)(4326008)(316002)(86362001)(110136005)(508600001)(6486002)(966005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?er6HrqUYb5OkrnzLuMSFqhJsiVQge3xO/h1Rkmkzxwv4aYnNzzAg+PqlZsKI?= =?us-ascii?Q?feZtP9jmC4GT4xifDd+L0AmhldfJCmRb/r35IBTsZUbgtyVcVeuXpLJb+CNo?= =?us-ascii?Q?k79uGSevA4RHag8lM7MTph/r3YHqNabdyaxNHOhJlq4grL3AEu8BB0muZTMX?= =?us-ascii?Q?D7++HouZDWsW9AEZgFj1VOi24cO53NrawV6eVQ99IaT2TzpFvyfHDReSPyOc?= =?us-ascii?Q?rxnFuy6zXFoq9XoQOsV6MVPQ+k0JKxAc0Ss3yFI5zBwH5yGz83ps28CPeFFe?= =?us-ascii?Q?orpLy7P9ABkCBMWn6cZPyl7Js+aaBmtLsr4NPWIA5fb9T40v5nuhVxltsdN5?= =?us-ascii?Q?Rhb0esLmDMfRPJLOkBSCk4VmL1/h1dNes4OQKdd3nn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akn3WxJkC3i+Bj+Pp4iiY9eq4Zp4JQr1/AJvpxt?= =?us-ascii?Q?yIn1jefzstrIfaDq2uJdGfDmWPdkPhPQHEKvCAX1HGxPGhXrFNMqWLpkFHgZ?= =?us-ascii?Q?LjAC53PbfXnt8tJOqoEmMXdNwrUOrhuDC6rBJl4DSXGX/EJ6q/GI0MmUZ7rg?= =?us-ascii?Q?p1Qikd1xzw5ls0Lk8mVTpHbtlK253B3PwVi6/vEU2oVq/8K0hjmBVu4tBcEK?= =?us-ascii?Q?elfLbnSxc+PKo+v3dSOUTdobbryr/iifYsI49O/NkcEabO6ce+AnuzLZDDLS?= =?us-ascii?Q?ncH6EB1dQVRXL/1HucGX1j5iL/rY2/SI96SuaJoch7wknLGehHJiE5/MLRgZ?= =?us-ascii?Q?IUGKt1kU0/pmrWNLoqEHjHe1uJq/pBVIHEYc49KmmR0XB2fFKfVw2CgUN9c7?= =?us-ascii?Q?sFxCfB/R5XTXU0nyktkNByg9/gj5T7APNUcgyu0Erm9Z6K7TfFQ9Xg6DrVUi?= =?us-ascii?Q?j2D6HA2R4w=3D=3D?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6057960-55f2-4986-9525-08da1ed8df49 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB4173.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2022 12:10:03.5820 (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: Ave+atBXLmUSEthf0XhQVEF5XBclHB5g/VXPC98CL3J5IyolTkQ7YMl9RYStWi9zlBZLB+dbQL7BnTJmx55Fig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4444 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace `if (!pause->autoneg)` with `else` for simplification 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 Suggested-by: Benjamin Poirier Signed-off-by: Yihao Han --- v2:edit commit message --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index bd0607680329..e3842eaf1532 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c @@ -3752,7 +3752,7 @@ int qlcnic_83xx_set_pauseparam(struct qlcnic_adapter *adapter, if (ahw->port_type == QLCNIC_GBE) { if (pause->autoneg) ahw->port_config |= QLC_83XX_ENABLE_AUTONEG; - if (!pause->autoneg) + else ahw->port_config &= ~QLC_83XX_ENABLE_AUTONEG; } else if ((ahw->port_type == QLCNIC_XGBE) && (pause->autoneg)) { return -EOPNOTSUPP; -- 2.17.1