linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/mlx5: remove unused num_alloc_xa_entries variable
@ 2023-03-30 15:36 Tom Rix
  2023-04-03 12:40 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rix @ 2023-03-30 15:36 UTC (permalink / raw)
  To: leon, jgg, nathan, ndesaulniers; +Cc: linux-rdma, linux-kernel, llvm, 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.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/infiniband/hw/mlx5/devx.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c
index 2211a0be16f3..07037b829c7e 100644
--- a/drivers/infiniband/hw/mlx5/devx.c
+++ b/drivers/infiniband/hw/mlx5/devx.c
@@ -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;
-- 
2.27.0


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

* Re: [PATCH] RDMA/mlx5: remove unused num_alloc_xa_entries variable
  2023-03-30 15:36 [PATCH] RDMA/mlx5: remove unused num_alloc_xa_entries variable Tom Rix
@ 2023-04-03 12:40 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2023-04-03 12:40 UTC (permalink / raw)
  To: jgg, nathan, ndesaulniers, Tom Rix; +Cc: linux-rdma, linux-kernel, llvm


On Thu, 30 Mar 2023 11:36:07 -0400, Tom Rix wrote:
> 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,
-- 
Leon Romanovsky <leon@kernel.org>

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

end of thread, other threads:[~2023-04-03 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 15:36 [PATCH] RDMA/mlx5: remove unused num_alloc_xa_entries variable Tom Rix
2023-04-03 12:40 ` Leon Romanovsky

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