提交 df475731 编写于 作者: G Guofeng Yue 提交者: Zheng Zengkai

RDMA/hns: Remove redundant variable "ret"

mainline inclusion
from mainline-for-linus
commit 601cdd86
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5CHIG
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/commit/?id=601cdd861cf551e330c85c4dfa6d25bef3b8d554

----------------------------------------------------------------------

It is completely redundant for this function to use "ret" to store the
return value of the subfunction.

Link: https://lore.kernel.org/r/20220409083254.9696-4-liangwenpeng@huawei.comSigned-off-by: NGuofeng Yue <yueguofeng@hisilicon.com>
Signed-off-by: NWenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: NZhengfeng Luo <luozhengfeng@h-partners.com>
Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 7eb1c4c6
...@@ -3045,7 +3045,6 @@ static int hns_roce_v2_write_mtpt(struct hns_roce_dev *hr_dev, ...@@ -3045,7 +3045,6 @@ static int hns_roce_v2_write_mtpt(struct hns_roce_dev *hr_dev,
void *mb_buf, struct hns_roce_mr *mr) void *mb_buf, struct hns_roce_mr *mr)
{ {
struct hns_roce_v2_mpt_entry *mpt_entry; struct hns_roce_v2_mpt_entry *mpt_entry;
int ret;
mpt_entry = mb_buf; mpt_entry = mb_buf;
memset(mpt_entry, 0, sizeof(*mpt_entry)); memset(mpt_entry, 0, sizeof(*mpt_entry));
...@@ -3084,9 +3083,7 @@ static int hns_roce_v2_write_mtpt(struct hns_roce_dev *hr_dev, ...@@ -3084,9 +3083,7 @@ static int hns_roce_v2_write_mtpt(struct hns_roce_dev *hr_dev,
to_hr_hw_page_shift(mr->pbl_mtr.hem_cfg.ba_pg_shift)); to_hr_hw_page_shift(mr->pbl_mtr.hem_cfg.ba_pg_shift));
hr_reg_enable(mpt_entry, MPT_INNER_PA_VLD); hr_reg_enable(mpt_entry, MPT_INNER_PA_VLD);
ret = set_mtpt_pbl(hr_dev, mpt_entry, mr); return set_mtpt_pbl(hr_dev, mpt_entry, mr);
return ret;
} }
static int hns_roce_v2_rereg_write_mtpt(struct hns_roce_dev *hr_dev, static int hns_roce_v2_rereg_write_mtpt(struct hns_roce_dev *hr_dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册