driver inclusion category: cleanup bugzilla: https://gitee.com/openeuler/kernel/issues/I6GT7F
--------------------------------------------------------------------------
The variables "hop_num" and "unit" are assigned values twice in get_best_hop_num(), which affects code maintainability. Therefore, redundant values are deleted.
Fixes: cf2f2029935c ("RDMA/hns: Support adaptive hopnum for MTR") Signed-off-by: Chengchang Tang tangchengchang@huawei.com --- drivers/infiniband/hw/hns/hns_roce_mr.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_mr.c b/drivers/infiniband/hw/hns/hns_roce_mr.c index e9c254d26ada..a2970e732034 100644 --- a/drivers/infiniband/hw/hns/hns_roce_mr.c +++ b/drivers/infiniband/hw/hns/hns_roce_mr.c @@ -990,8 +990,6 @@ static int get_best_hop_num(struct hns_roce_dev *hr_dev, if (!buf_attr->adaptive) return 0;
- hop_num = INVALID_HOPNUM; - unit = MIN_BA_CNT; /* Caculating the number of buf pages, each buf page needs a BA */ if (mtr->umem) ba_cnt = ib_umem_num_dma_blocks(mtr->umem, buf_pg_sz);