netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: remove redundant assignment to variable object_range
@ 2024-02-06 16:58 Colin Ian King
  2024-02-07  9:48 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-02-06 16:58 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-rdma
  Cc: kernel-janitors, linux-kernel

The variable object_range to log_header_modify_argument_granularity
is being assigned a value that is never read, the following statement
assigns object_range to the max of log_header_modify_argument_granularity
and DR_ICM_MODIFY_HDR_GRANULARITY_4K, so clearly the initial
assignment is redundant. Remove it.

Cleans up clang-scan build warning:
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_arg.c:42:2: warning:
Value stored to 'object_range' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_arg.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_arg.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_arg.c
index 01ed6442095d..c2218dc556c7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_arg.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_arg.c
@@ -39,9 +39,6 @@ static int dr_arg_pool_alloc_objs(struct dr_arg_pool *pool)
 
 	INIT_LIST_HEAD(&cur_list);
 
-	object_range =
-		pool->dmn->info.caps.log_header_modify_argument_granularity;
-
 	object_range =
 		max_t(u32, pool->dmn->info.caps.log_header_modify_argument_granularity,
 		      DR_ICM_MODIFY_HDR_GRANULARITY_4K);
-- 
2.39.2


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

end of thread, other threads:[~2024-02-07  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 16:58 [PATCH] net/mlx5: remove redundant assignment to variable object_range Colin Ian King
2024-02-07  9:48 ` Simon Horman

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).