From: Tariq Toukan <tariqt@mellanox.com>
To: Varsha Rao <rvarsha016@gmail.com>,
Tariq Toukan <tariqt@mellanox.com>,
"David S. Miller" <davem@davemloft.net>,
Nicholas Mc Guire <der.herr@hofr.at>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: mlx4: Remove unnecessary parentheses
Date: Sun, 3 Jun 2018 10:15:07 +0300 [thread overview]
Message-ID: <afe2c643-ba7d-5bf5-11ce-7e13be1bee4b@mellanox.com> (raw)
In-Reply-To: <20180601020049.3704-1-rvarsha016@gmail.com>
On 01/06/2018 5:00 AM, Varsha Rao wrote:
> This patch fixes the clang warning of extraneous parentheses, with the
> following coccinelle script.
>
> @@
> identifier i;
> expression e;
> statement s;
> @@
> if (
> -(i == e)
> +i == e
> )
> s
>
> Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
> ---
> drivers/net/ethernet/mellanox/mlx4/port.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx4/port.c b/drivers/net/ethernet/mellanox/mlx4/port.c
> index 3ef3406ff4cb..10fcc22f4590 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/port.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/port.c
> @@ -614,9 +614,9 @@ int __mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan,
> int index_at_dup_port = -1;
>
> for (i = MLX4_VLAN_REGULAR; i < MLX4_MAX_VLAN_NUM; i++) {
> - if ((vlan == (MLX4_VLAN_MASK & be32_to_cpu(table->entries[i]))))
> + if (vlan == (MLX4_VLAN_MASK & be32_to_cpu(table->entries[i])))
> index_at_port = i;
> - if ((vlan == (MLX4_VLAN_MASK & be32_to_cpu(dup_table->entries[i]))))
> + if (vlan == (MLX4_VLAN_MASK & be32_to_cpu(dup_table->entries[i])))
> index_at_dup_port = i;
> }
> /* check that same vlan is not in the tables at different indices */
>
Acked-by: Tariq Toukan <tariqt@mellanox.com>
Thanks for your patch,
Tariq
next prev parent reply other threads:[~2018-06-03 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 2:00 Varsha Rao
2018-06-03 7:15 ` Tariq Toukan [this message]
2018-06-04 14:15 ` David Miller
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=afe2c643-ba7d-5bf5-11ce-7e13be1bee4b@mellanox.com \
--to=tariqt@mellanox.com \
--cc=davem@davemloft.net \
--cc=der.herr@hofr.at \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rvarsha016@gmail.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
all inboxes | Powered by JetHome®