Commit b133b21f authored by Chengchang Tang's avatar Chengchang Tang Committed by Juan Zhou
Browse files

RDMA/hns: Delete redundant assignment values

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: cf2f2029 ("RDMA/hns: Support adaptive hopnum for MTR")
Signed-off-by: default avatarChengchang Tang <tangchengchang@huawei.com>
parent bcfafb49
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);