Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2438897rwb; Sun, 6 Aug 2023 18:52:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsnkuiOuuRYVcj4wDuAxFBxKJa+k2Rl7a6fNw5V+78DXN8OZVu8GcvFiTth539BRwH1Rxi X-Received: by 2002:a05:6a20:7354:b0:13d:ee19:7717 with SMTP id v20-20020a056a20735400b0013dee197717mr8459827pzc.19.1691373128734; Sun, 06 Aug 2023 18:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691373128; cv=none; d=google.com; s=arc-20160816; b=jPCGyvEy6vBdfZomYG1YS5ETCFEQ/HCiX3tl2RpSVWFU3G2XA7sMizCK71S5Nh12Sk 4EfxVf1Mn6cNYYKNN97RJu8QfftFALcAqisK3P/sicXBwS8ZD6dcgG84BxQP8/1FLOII TxQntCGuIhy4pfPa3vlLlu+ZCHlkvic6y64/mao13h4AtfC9qVUKM0l1DIKGy4NbO8Cw ZEiBcH1JF+bYYHQfUgCzFybQS/u/xF6jbpsS0u7kcsS5p5I/M/7i2Op/NkwLB548HQUI MnqkC5p5zaCWHV8psDdA0mkpb2C7beaGAbbou5TuVywhMsjC/852bZBXkXn4N/FFZsd4 WqlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:authenticated-by; bh=JUGKs0zi+NCkpMLSj62lSxRERe9idixPSUHhWLZ4Dig=; fh=uz7MiSJGc5cuF2sjOIxjDJUBT+wTZwENfah4LPkd3Pg=; b=jmC3V7DUbSRxogWui8hn9rTetso6MiCEGpe+6mf9Clin5yWjBKwkea/jFE6Q0mpZbV XbePIaduXm9FMOdhlMVCDJlIGGJgZ++GYOojFVR8RdnaSEL1vv7lvO+1AKVN6fDwUohX eLhDq5ZYtK4rfPItDOc/Qs93KBwYaZJvPwFfBLxwz/dliQFUjMwyIH371pfzr+GKUkv4 8XMHJuv8iqzp/M/A1Dv9Y8FSbiLcc98A+LdrvQsjsmWwz48OgBsvsPDk7GJYh/WLU/BT qa6JlCPcqgJZHxi5dLOn6UrO6zw+956E7K5ojchxeqnmwOlUZ4ZdL6By6xeqUHEESCge MjSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a170902d48500b001b885fbe17dsi5276962plg.532.2023.08.06.18.52.01; Sun, 06 Aug 2023 18:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjHGBoE convert rfc822-to-8bit (ORCPT + 56 others); Sun, 6 Aug 2023 21:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbjHGBoC (ORCPT ); Sun, 6 Aug 2023 21:44:02 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E59DB170B; Sun, 6 Aug 2023 18:43:52 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 3771fdYB3029494, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 3771fdYB3029494 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Mon, 7 Aug 2023 09:41:39 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Mon, 7 Aug 2023 09:41:34 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 7 Aug 2023 09:41:33 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Mon, 7 Aug 2023 09:41:33 +0800 From: Ping-Ke Shih To: Ruan Jinjie , "sgoutham@marvell.com" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "jesse.brandeburg@intel.com" , "anthony.l.nguyen@intel.com" , "tariqt@nvidia.com" , "s.shtylyov@omp.ru" , "aspriel@gmail.com" , "franky.lin@broadcom.com" , "hante.meuleman@broadcom.com" , "kvalo@kernel.org" , "richardcochran@gmail.com" , "yoshihiro.shimoda.uh@renesas.com" , "u.kleine-koenig@pengutronix.de" , "mkl@pengutronix.de" , "lee@kernel.org" , "set_pte_at@outlook.com" , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" , "linux-rdma@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-wireless@vger.kernel.org" , "brcm80211-dev-list.pdl@broadcom.com" , "SHA-cyfmac-dev-list@infineon.com" Subject: RE: [PATCH -next 3/6] net/mlx4: Remove an unnecessary ternary operator Thread-Topic: [PATCH -next 3/6] net/mlx4: Remove an unnecessary ternary operator Thread-Index: AQHZxodwyq+yd8Ng70KD3Dr7pngH66/eE0hg Date: Mon, 7 Aug 2023 01:41:33 +0000 Message-ID: References: <20230804035346.2879318-1-ruanjinjie@huawei.com> <20230804035346.2879318-4-ruanjinjie@huawei.com> In-Reply-To: <20230804035346.2879318-4-ruanjinjie@huawei.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham 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-wireless@vger.kernel.org > -----Original Message----- > From: Ruan Jinjie > Sent: Friday, August 4, 2023 11:54 AM > To: sgoutham@marvell.com; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; > jesse.brandeburg@intel.com; anthony.l.nguyen@intel.com; tariqt@nvidia.com; s.shtylyov@omp.ru; > aspriel@gmail.com; franky.lin@broadcom.com; hante.meuleman@broadcom.com; kvalo@kernel.org; > richardcochran@gmail.com; yoshihiro.shimoda.uh@renesas.com; ruanjinjie@huawei.com; > u.kleine-koenig@pengutronix.de; mkl@pengutronix.de; lee@kernel.org; set_pte_at@outlook.com; > linux-arm-kernel@lists.infradead.org; netdev@vger.kernel.org; intel-wired-lan@lists.osuosl.org; > linux-rdma@vger.kernel.org; linux-renesas-soc@vger.kernel.org; linux-wireless@vger.kernel.org; > brcm80211-dev-list.pdl@broadcom.com; SHA-cyfmac-dev-list@infineon.com > Subject: [PATCH -next 3/6] net/mlx4: Remove an unnecessary ternary operator > > There is a ternary operator, the true or false judgement > of which is unnecessary in C language semantics. > > Signed-off-by: Ruan Jinjie > --- > drivers/net/ethernet/mellanox/mlx4/port.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c > index 256a06b3c096..1c289488d050 100644 > --- a/drivers/net/ethernet/mellanox/mlx4/port.c > +++ b/drivers/net/ethernet/mellanox/mlx4/port.c > @@ -176,7 +176,7 @@ static bool mlx4_need_mf_bond(struct mlx4_dev *dev) > mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) > ++num_eth_ports; > > - return (num_eth_ports == 2) ? true : false; > + return num_eth_ports == 2; It should be one space between '=' and '2'. > } > > int __mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac) > -- > 2.34.1 > > > ------Please consider the environment before printing this e-mail.