RDMA/bnxt_re: Remove the unused variable en_dev
Subsystems (2)
PATCH 1/1 RDMA/bnxt_re: Remove the unused variable en_dev
Variable en_dev is not effectively used, so delete it.
drivers/infiniband/hw/bnxt_re/main.c:1980:22: warning: variable ‘en_dev’ set but not used.
--- drivers/infiniband/hw/bnxt_re/main.c | 2 -- 1 file changed, 2 deletions(-)
drivers/infiniband/hw/bnxt_re/main.c +0 -2
@@ -1977,7 +1977,6 @@ static void bnxt_re_remove_device(struct bnxt_re_dev *rdev, u8 op_type,static void bnxt_re_remove (struct auxiliary_device *adev) {struct bnxt_re_en_dev_info *en_info =auxiliary_get_drvdata (adev); -struct bnxt_en_dev *en_dev;struct bnxt_re_dev *rdev;mutex_lock (&bnxt_re_mutex);
@@ -1985,7 +1984,6 @@ static void bnxt_re_remove(struct auxiliary_device *adev)mutex_unlock (&bnxt_re_mutex);return ; } - en_dev = en_info->en_dev; rdev = en_info->rdev;if (rdev)
Signature · 1 line
2.32.0.3.g01195cf9f
Selvin Xavier
maintainerQuoted 4 lines · Jiapeng Chong
Variable
en_devis not effectively used, so delete it.
drivers/infiniband/hw/bnxt_re/main.c:1980:22: warning: variable ‘en_dev’ set but not used.
Not sure if you are applying v1 of a previous patch series. A similar issue was reported by kernel test robot and i fixed in v2. I dont see this code in the latest driver code.
Quoted 32 lines
Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/infiniband/hw/bnxt_re/main.c | 2 -- 1 file changed, 2 deletions(-)drivers/infiniband/hw/bnxt_re/main.c +0
-3@@ -1977,7 +1977,6 @@ static void bnxt_re_remove_device(struct bnxt_re_dev *rdev, u8 op_type,static void bnxt_re_remove (struct auxiliary_device *adev) {struct bnxt_re_en_dev_info *en_info =auxiliary_get_drvdata (adev); -struct bnxt_en_dev *en_dev;struct bnxt_re_dev *rdev;mutex_lock (&bnxt_re_mutex);@@ -1985,7 +1984,6 @@ static void bnxt_re_remove(struct auxiliary_device *adev)mutex_unlock (&bnxt_re_mutex);return ; } - en_dev = en_info->en_dev; rdev = en_info->rdev;if (rdev) --2.32.0.3.g01195cf9f
Quoted 10 lines · Selvin Xavier
Quoted 4 lines · Jiapeng Chong
Variable
en_devis not effectively used, so delete it.
drivers/infiniband/hw/bnxt_re/main.c:1980:22: warning: variable ‘en_dev’ set but not used.Not sure if you are applying v1 of a previous patch series. A similar issue was reported by kernel test robot and i fixed in v2. I dont see this code in the latest driver code.
Similar but not the same, I applied your v2 series, but Jiapeng's patch is valid:
1977 static void bnxt_re_remove(struct auxiliary_device *adev)
1978 {
1979 struct bnxt_re_en_dev_info *en_info = auxiliary_get_drvdata(adev);
1980 struct bnxt_en_dev *en_dev;
1981 struct bnxt_re_dev *rdev;
1982
1983 mutex_lock(&bnxt_re_mutex);
1984 if (!en_info) {
1985 mutex_unlock(&bnxt_re_mutex);
1986 return;
1987 }
1988 en_dev = en_info->en_dev;
1989 rdev = en_info->rdev;
1990
1991 if (rdev)
1992 bnxt_re_remove_device(rdev, BNXT_RE_COMPLETE_REMOVE, adev);
1993 kfree(en_info);
1994 mutex_unlock(&bnxt_re_mutex);
1995 }Thanks
Leon Romanovsky
AppliedQuoted 5 lines · Jiapeng Chong
Variable
en_devis not effectively used, so delete it.
drivers/infiniband/hw/bnxt_re/main.c:1980:22: warning: variable ‘en_dev’ set but not used.
Applied, thanks!
[1/1] RDMA/bnxt_re: Remove the unused variable en_dev
https://git.kernel.org/rdma/rdma/c/70920941923316
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>