Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ruan Jinjie <ruanjinjie@huawei.com>
To: Ping-Ke Shih <pkshih@realtek.com>,
	"sgoutham@marvell.com" <sgoutham@marvell.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"jesse.brandeburg@intel.com" <jesse.brandeburg@intel.com>,
	"anthony.l.nguyen@intel.com" <anthony.l.nguyen@intel.com>,
	"tariqt@nvidia.com" <tariqt@nvidia.com>,
	"s.shtylyov@omp.ru" <s.shtylyov@omp.ru>,
	"aspriel@gmail.com" <aspriel@gmail.com>,
	"franky.lin@broadcom.com" <franky.lin@broadcom.com>,
	"hante.meuleman@broadcom.com" <hante.meuleman@broadcom.com>,
	"kvalo@kernel.org" <kvalo@kernel.org>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"yoshihiro.shimoda.uh@renesas.com"
	<yoshihiro.shimoda.uh@renesas.com>,
	"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
	"mkl@pengutronix.de" <mkl@pengutronix.de>,
	"lee@kernel.org" <lee@kernel.org>,
	"set_pte_at@outlook.com" <set_pte_at@outlook.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"brcm80211-dev-list.pdl@broadcom.com"
	<brcm80211-dev-list.pdl@broadcom.com>,
	"SHA-cyfmac-dev-list@infineon.com"
	<SHA-cyfmac-dev-list@infineon.com>
Subject: Re: [Intel-wired-lan] [PATCH -next 3/6] net/mlx4: Remove an unnecessary ternary operator
Date: Mon, 7 Aug 2023 13:00:09 +0800	[thread overview]
Message-ID: <e694d4ce-037a-45c7-d2c4-67ede755a73b@huawei.com> (raw)
In-Reply-To: <fd3e9bb40d12421caaddda7279aece7a@realtek.com>



On 2023/8/7 9:41, Ping-Ke Shih wrote:
> 
> 
>> -----Original Message-----
>> From: Ruan Jinjie <ruanjinjie@huawei.com>
>> 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 <ruanjinjie@huawei.com>
>> ---
>>  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'.

Thank you! I'll improve it sooner.

> 
>>  }
>>
>>  int __mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac)
>> --
>> 2.34.1
>>
>>
>> ------Please consider the environment before printing this e-mail.
> 
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-08-07 15:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04  3:53 [Intel-wired-lan] [PATCH -next 0/6] net: Remove unnecessary ternary operators Ruan Jinjie
2023-08-04  3:53 ` [Intel-wired-lan] [PATCH -next 1/6] net: thunderx: " Ruan Jinjie
2023-08-07  1:39   ` Ping-Ke Shih
2023-08-07  4:59     ` Ruan Jinjie
2023-08-07 17:34       ` Jacob Keller
2023-08-04  3:53 ` [Intel-wired-lan] [PATCH -next 2/6] ethernet/intel: " Ruan Jinjie
2023-08-07 17:35   ` Jacob Keller
2023-08-04  3:53 ` [Intel-wired-lan] [PATCH -next 3/6] net/mlx4: Remove an unnecessary ternary operator Ruan Jinjie
2023-08-07  1:41   ` Ping-Ke Shih
2023-08-07  5:00     ` Ruan Jinjie [this message]
2023-08-04  3:53 ` [Intel-wired-lan] [PATCH -next 4/6] net: ethernet: renesas: rswitch: " Ruan Jinjie
2023-08-04  3:53 ` [Intel-wired-lan] [PATCH -next 5/6] net: fjes: " Ruan Jinjie
2023-08-04  3:53 ` [Intel-wired-lan] [PATCH -next 6/6] brcm80211: " Ruan Jinjie
2023-08-07  1:42   ` Ping-Ke Shih
2023-08-07  5:00     ` Ruan Jinjie
2023-08-04 20:17 ` [Intel-wired-lan] [PATCH -next 0/6] net: Remove unnecessary ternary operators Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e694d4ce-037a-45c7-d2c4-67ede755a73b@huawei.com \
    --to=ruanjinjie@huawei.com \
    --cc=SHA-cyfmac-dev-list@infineon.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=aspriel@gmail.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pkshih@realtek.com \
    --cc=richardcochran@gmail.com \
    --cc=s.shtylyov@omp.ru \
    --cc=set_pte_at@outlook.com \
    --cc=sgoutham@marvell.com \
    --cc=tariqt@nvidia.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox