linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx5e: CT: remove set but not used variable 'unnew'
@ 2020-03-14 10:44 YueHaibing
  2020-03-16 21:19 ` Saeed Mahameed
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2020-03-14 10:44 UTC (permalink / raw)
  To: saeedm, leon, davem, ozsh, paulb, roid, jiri
  Cc: netdev, linux-rdma, linux-kernel, YueHaibing

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c:
 In function mlx5_tc_ct_parse_match:
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c:699:36: warning:
 variable unnew set but not used [-Wunused-but-set-variable]

commit 4c3844d9e97e ("net/mlx5e: CT: Introduce connection tracking")
involed this unused variable, remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 3 +--
 1 file changed, 1 insertion(+), 2 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 956d9ddcdeed..9fe150957d65 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
@@ -696,7 +696,7 @@ mlx5_tc_ct_parse_match(struct mlx5e_priv *priv,
 {
 	struct mlx5_tc_ct_priv *ct_priv = mlx5_tc_ct_get_ct_priv(priv);
 	struct flow_dissector_key_ct *mask, *key;
-	bool trk, est, untrk, unest, new, unnew;
+	bool trk, est, untrk, unest, new;
 	u32 ctstate = 0, ctstate_mask = 0;
 	u16 ct_state_on, ct_state_off;
 	u16 ct_state, ct_state_mask;
@@ -739,7 +739,6 @@ mlx5_tc_ct_parse_match(struct mlx5e_priv *priv,
 	new = ct_state_on & TCA_FLOWER_KEY_CT_FLAGS_NEW;
 	est = ct_state_on & TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED;
 	untrk = ct_state_off & TCA_FLOWER_KEY_CT_FLAGS_TRACKED;
-	unnew = ct_state_off & TCA_FLOWER_KEY_CT_FLAGS_NEW;
 	unest = ct_state_off & TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED;
 
 	ctstate |= trk ? MLX5_CT_STATE_TRK_BIT : 0;
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net/mlx5e: CT: remove set but not used variable 'unnew'
  2020-03-14 10:44 [PATCH net-next] net/mlx5e: CT: remove set but not used variable 'unnew' YueHaibing
@ 2020-03-16 21:19 ` Saeed Mahameed
  0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2020-03-16 21:19 UTC (permalink / raw)
  To: yuehaibing, Jiri Pirko, Roi Dayan, davem, Oz Shlomo, leon, Paul Blakey
  Cc: netdev, linux-rdma, linux-kernel

On Sat, 2020-03-14 at 18:44 +0800, YueHaibing wrote:
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c:
>  In function mlx5_tc_ct_parse_match:
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c:699:36: warning:
>  variable unnew set but not used [-Wunused-but-set-variable]
> 
> commit 4c3844d9e97e ("net/mlx5e: CT: Introduce connection tracking")
> involed this unused variable, remove it.
> 

I took the liberty to fix this to a proper "Fixes:" tag.

Applied to net-next-mlx5

Thanks,
Saeed.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-16 21:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-14 10:44 [PATCH net-next] net/mlx5e: CT: remove set but not used variable 'unnew' YueHaibing
2020-03-16 21:19 ` Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).