git: 3a0b2432828e - main - Fix unused variable warning in mlx5_ib_devx.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 22:40:44 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3a0b2432828e9014bfea064baefd0dd051fc3cd6 commit 3a0b2432828e9014bfea064baefd0dd051fc3cd6 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-24 22:16:18 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-24 22:40:13 +0000 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;