From 3a0b2432828e9014bfea064baefd0dd051fc3cd6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 25 Jul 2022 00:16:18 +0200 Subject: [PATCH] Fix unused variable warning in mlx5_ib_devx.c With clang 15, the following -Werror warning is produced: sys/dev/mlx5/mlx5_ib/mlx5_ib_devx.c:1926:6: error: variable 'num_alloc_xa_entries' set but not used [-Werror,-Wunused-but-set-variable] int num_alloc_xa_entries = 0; ^ The 'num_alloc_xa_entries' variable appears to have been a debugging aid that has never been used for anything, so remove it. MFC after: 3 days --- sys/dev/mlx5/mlx5_ib/mlx5_ib_devx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_devx.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_devx.c index e8c982978998..8d22b4ed3637 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_devx.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_devx.c @@ -1923,7 +1923,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; @@ -2005,7 +2004,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) goto err;