mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roi Dayan <roid@nvidia.com>
To: Yihao Han <hanyihao@vivo.com>, Saeed Mahameed <saeedm@nvidia.com>,
	"Leon Romanovsky" <leon@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	Paul Blakey <paulb@nvidia.com>, Oz Shlomo <ozsh@nvidia.com>,
	Ariel Levkovich <lariel@nvidia.com>,
	Vlad Buslov <vladbu@nvidia.com>, Chris Mi <cmi@nvidia.com>,
	<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <kernel@vivo.com>
Subject: Re: [PATCH] net/mlx5:using swap() instead of tmp variable
Date: Wed, 3 Nov 2021 08:57:15 +0200	[thread overview]
Message-ID: <bb52fc1b-4e95-bc5e-6aa9-82b9b35967cf@nvidia.com> (raw)
In-Reply-To: <20211103062111.3286-1-hanyihao@vivo.com>



On 2021-11-03 8:21 AM, Yihao Han wrote:
> swap() was used instead of the tmp variable to swap values
> 
> Signed-off-by: Yihao Han <hanyihao@vivo.com>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
> index 740cd6f088b8..d4b4f32603f2 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
> @@ -907,12 +907,9 @@ mlx5_tc_ct_shared_counter_get(struct mlx5_tc_ct_priv *ct_priv,
>   	struct mlx5_ct_tuple rev_tuple = entry->tuple;
>   	struct mlx5_ct_counter *shared_counter;
>   	struct mlx5_ct_entry *rev_entry;
> -	__be16 tmp_port;
>   
>   	/* get the reversed tuple */
> -	tmp_port = rev_tuple.port.src;
> -	rev_tuple.port.src = rev_tuple.port.dst;
> -	rev_tuple.port.dst = tmp_port;
> +	swap(rev_tuple.port.src, rev_tuple.port.dst);
>   
>   	if (rev_tuple.addr_type == FLOW_DISSECTOR_KEY_IPV4_ADDRS) {
>   		__be32 tmp_addr = rev_tuple.ip.src_v4;
> 


just small comment on the title.
missing a space in the commit title after the colon.
I also think the prefix should be "net/mlx5e: CT, ..."

Reviewed-by: Roi Dayan <roid@nvidia.com>

  reply	other threads:[~2021-11-03  6:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03  6:21 Yihao Han
2021-11-03  6:57 ` Roi Dayan [this message]
2021-11-03 19:33   ` Saeed Mahameed
2021-11-16 20:55   ` Saeed Mahameed

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=bb52fc1b-4e95-bc5e-6aa9-82b9b35967cf@nvidia.com \
    --to=roid@nvidia.com \
    --cc=cmi@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=hanyihao@vivo.com \
    --cc=kernel@vivo.com \
    --cc=kuba@kernel.org \
    --cc=lariel@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ozsh@nvidia.com \
    --cc=paulb@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=vladbu@nvidia.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®