Skip to content

Commit 7496a51

Browse files
KAGA-KOKOjgunthorpe
authored andcommitted
IB/mlx5: Remove set-but-not-used variables
Avoid that the compiler complains about set-but-not-used variables when building with W=1. This patch does not change any functionality. Signed-off-by: Bart Van Assche <[email protected]> Cc: Leon Romanovsky <[email protected]> Acked-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent af7b641 commit 7496a51

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4052,15 +4052,12 @@ static void hns_roce_mhop_free_eq(struct hns_roce_dev *hr_dev,
40524052
u32 bt_chk_sz;
40534053
u32 mhop_num;
40544054
int eqe_alloc;
4055-
int ba_num;
40564055
int i = 0;
40574056
int j = 0;
40584057

40594058
mhop_num = hr_dev->caps.eqe_hop_num;
40604059
buf_chk_sz = 1 << (hr_dev->caps.eqe_buf_pg_sz + PAGE_SHIFT);
40614060
bt_chk_sz = 1 << (hr_dev->caps.eqe_ba_pg_sz + PAGE_SHIFT);
4062-
ba_num = (PAGE_ALIGN(eq->entries * eq->eqe_size) + buf_chk_sz - 1) /
4063-
buf_chk_sz;
40644061

40654062
/* hop_num = 0 */
40664063
if (mhop_num == HNS_ROCE_HOP_NUM_0) {

drivers/infiniband/hw/mlx5/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5784,9 +5784,7 @@ static void mlx5_ib_stage_roce_cleanup(struct mlx5_ib_dev *dev)
57845784
struct mlx5_core_dev *mdev = dev->mdev;
57855785
enum rdma_link_layer ll;
57865786
int port_type_cap;
5787-
u8 port_num;
57885787

5789-
port_num = mlx5_core_native_port_num(dev->mdev) - 1;
57905788
port_type_cap = MLX5_CAP_GEN(mdev, port_type);
57915789
ll = mlx5_port_type_cap_to_rdma_ll(port_type_cap);
57925790

0 commit comments

Comments
 (0)