Skip to contentSkip to conversation

net/mlx5e: Remove redundant assignment

PATCH Applied Gustavo A. R. Silva 6 participants 10 messages Mar 2, 2019 – Mar 18, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5e: Remove redundant assignment

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")
---
 drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c +2 -4
index 40f4a19b1ce1..be69c1d7941a 100644
@@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
 	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
 	tun_entropy->num_enabling_entries = 0;
 	tun_entropy->num_disabling_entries = 0;
-	tun_entropy->enabled = entropy_flags.calc_enabled;
-	tun_entropy->enabled =
-		(entropy_flags.calc_supported) ?
-		entropy_flags.calc_enabled : true;
+	tun_entropy->enabled = entropy_flags.calc_supported ?
+			       entropy_flags.calc_enabled : true;
 }
 
 static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Gustavo A. R. Silva

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

Quoted 23 lines
---
 drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c +2 -4
index 40f4a19b1ce1..be69c1d7941a 100644
@@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
 	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
 	tun_entropy->num_enabling_entries = 0;
 	tun_entropy->num_disabling_entries = 0;
-	tun_entropy->enabled = entropy_flags.calc_enabled;
-	tun_entropy->enabled =
-		(entropy_flags.calc_supported) ?
-		entropy_flags.calc_enabled : true;
+	tun_entropy->enabled = entropy_flags.calc_supported ?
+			       entropy_flags.calc_enabled : true;
 }
 
 static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
Reviewed-by
#2 lore raw
Quoted 36 lines · Roi Dayan
Quoted 4 lines · Gustavo A. R. Silva

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

Quoted 23 lines
---
  drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c +2 -4
index 40f4a19b1ce1..be69c1d7941a 100644
@@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
  	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
  	tun_entropy->num_enabling_entries = 0;
  	tun_entropy->num_disabling_entries = 0;
-	tun_entropy->enabled = entropy_flags.calc_enabled;
-	tun_entropy->enabled =
-		(entropy_flags.calc_supported) ?
-		entropy_flags.calc_enabled : true;
+	tun_entropy->enabled = entropy_flags.calc_supported ?
+			       entropy_flags.calc_enabled : true;
  }
 
  static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
#3 lore raw

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

Quoted 39 lines · Eli Britstein
Quoted 36 lines · Roi Dayan
Quoted 4 lines · Gustavo A. R. Silva

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

Quoted 23 lines
---
  drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c +2 -4
index 40f4a19b1ce1..be69c1d7941a 100644
@@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
  	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
  	tun_entropy->num_enabling_entries = 0;
  	tun_entropy->num_disabling_entries = 0;
-	tun_entropy->enabled = entropy_flags.calc_enabled;
-	tun_entropy->enabled =
-		(entropy_flags.calc_supported) ?
-		entropy_flags.calc_enabled : true;
+	tun_entropy->enabled = entropy_flags.calc_supported ?
+			       entropy_flags.calc_enabled : true;
  }
 
  static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
#4 lore raw
Quoted 6 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Who can take this?

Hi Gustavo,

I already replied on March 8, that this patch was applied to my branch, net-next-mlx5,

https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?h=net-next-mlx5&id=6279999c6e3de5a93312a2d66b3fd6ac8636f260

Once net-next is open, this patch is going to make it there as part of my next pull request to Dave.

Thanks,
Saeed.

Quoted 50 lines

Thanks
--
Gustavo

Quoted 45 lines · Eli Britstein
Quoted 42 lines · Roi Dayan
Quoted 5 lines · Gustavo A. R. Silva

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling

port tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

Quoted 29 lines
---
  drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6
++----
  1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c index 40f4a19b1ce1..be69c1d7941a 100644

drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c +2 -4
@@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct
 mlx5_tun_entropy *tun_entropy,
  	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
  	tun_entropy->num_enabling_entries = 0;
  	tun_entropy->num_disabling_entries = 0;
-	tun_entropy->enabled = entropy_flags.calc_enabled;
-	tun_entropy->enabled =
-		(entropy_flags.calc_supported) ?
-		entropy_flags.calc_enabled : true;
+	tun_entropy->enabled = entropy_flags.calc_supported ?
+			       entropy_flags.calc_enabled :
 true;
  }

static int mlx5_set_entropy(struct mlx5_tun_entropy
*tun_entropy,

#5 lore raw
Quoted 5 lines · Saeed Mahameed
Quoted 4 lines · Gustavo A. R. Silva

Hi all,

Friendly ping:

Quoted 9 lines
Quoted 2 lines

Who can take this?

Hi Gustavo,

I already replied on March 8, that this patch was applied to my branch, net-next-mlx5,

Oh, somehow I missed that one.

Quoted 5 lines

https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?h=net-next-mlx5&id=6279999c6e3de5a93312a2d66b3fd6ac8636f260

Once net-next is open, this patch is going to make it there as part of my next pull request to Dave.

Sounds great. :)

Thanks, Saeed.

--
Gustavo

#6 lore raw
In reply to Roi Dayan
Quoted 11 lines · Roi Dayan
Quoted 4 lines · Gustavo A. R. Silva

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

It doesn't matter if it is real issue or not, the code is wrong and should be fixed. This alone is enough to see the Fixes line.

Thanks,

#7 lore raw
Quoted 13 lines · Leon Romanovsky
Quoted 11 lines · Roi Dayan
Quoted 5 lines · Gustavo A. R. Silva

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port

tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

Quoted 5 lines

It doesn't matter if it is real issue or not, the code is wrong and should be fixed. This alone is enough to see the Fixes line.

Thanks,

Dave, Do you think such patch should go to net, or do you want me to send it in my next pull request to net-next, once it is open of course ?

maintainer
#8 lore raw

From: Saeed Mahameed <[email protected]>
Date: Tue, 5 Mar 2019 22:21:39 +0000

Quoted 17 lines · Leon Romanovsky
Quoted 16 lines · Roi Dayan
Quoted 11 lines · Gustavo A. R. Silva
Quoted 5 lines

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port

tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

It doesn't matter if it is real issue or not, the code is wrong and should be fixed. This alone is enough to see the Fixes line.

Quoted 7 lines
Quoted 2 lines

Thanks,

Dave, Do you think such patch should go to net, or do you want me to send it in my next pull request to net-next, once it is open of course ?

This feels more like net-next stuff to me, thanks for asking.

#9 lore raw
Quoted 24 lines · David Miller

From: Saeed Mahameed <[email protected]>
Date: Tue, 5 Mar 2019 22:21:39 +0000

Quoted 21 lines · Leon Romanovsky
Quoted 19 lines · Roi Dayan
Quoted 11 lines · Gustavo A. R. Silva
Quoted 6 lines

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")

Fixes 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling

port
tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup. so I'm not sure if fixes line is relevant or not. beside that looks ok.

It doesn't matter if it is real issue or not, the code is wrong and
should be fixed. This alone is enough to see the Fixes line.

Thanks,

Quoted 8 lines
Quoted 6 lines

Dave, Do you think such patch should go to net, or do you want me to
send it in my next pull request to net-next, once it is open of course
?

This feels more like net-next stuff to me, thanks for asking.

Applied to net-next-mlx5, will be sent in the next pull request when net-next reopens, Thanks!