Skip to contentSkip to conversation

RDMA/mlx5: remove unused num_alloc_xa_entries variable

PATCH Applied Tom Rix 2 participants 2 messages Mar 30, 2023 – Apr 3, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 RDMA/mlx5: remove unused num_alloc_xa_entries variable

clang with W=1 reports
drivers/infiniband/hw/mlx5/devx.c:1996:6: error: variable
'num_alloc_xa_entries' set but not used [-Werror,-Wunused-but-set-variable]

        int num_alloc_xa_entries = 0;
            ^

This variable is not used so remove it.

---
 drivers/infiniband/hw/mlx5/devx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/infiniband/hw/mlx5/devx.c +0 -2
index 2211a0be16f3..07037b829c7e 100644
@@ -1993,7 +1993,6 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT)(
 	int redirect_fd;
 	bool use_eventfd = false;
 	int num_events;
-	int num_alloc_xa_entries = 0;
 	u16 obj_type = 0;
 	u64 cookie = 0;
 	u32 obj_id = 0;
@@ -2075,7 +2074,6 @@ static int UVERBS_HANDLER(MLX5_IB_METHOD_DEVX_SUBSCRIBE_EVENT)(
 		if (err)
 			goto err;
 
-		num_alloc_xa_entries++;
 		event_sub = kzalloc(sizeof(*event_sub), GFP_KERNEL);
 		if (!event_sub) {
 			err = -ENOMEM;
Signature · 1 line
2.27.0
#1 lore raw
Quoted 8 lines · Tom Rix

clang with W=1 reports
drivers/infiniband/hw/mlx5/devx.c:1996:6: error: variable
'num_alloc_xa_entries' set but not used [-Werror,-Wunused-but-set-variable]

        int num_alloc_xa_entries = 0;
            ^

This variable is not used so remove it.

[...]

Applied, thanks!

[1/1] RDMA/mlx5: remove unused num_alloc_xa_entries variable

      https://git.kernel.org/rdma/rdma/c/9eed9353a16755

Best regards,

Signature · 1 line
Leon Romanovsky <[email protected]>