Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Wenpeng Liang <liangwenpeng@huawei.com>
To: <jgg@nvidia.com>, <leon@kernel.org>
Cc: <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>,
	<liangwenpeng@huawei.com>
Subject: [PATCH for-next 3/5] RDMA/hns: Remove redundant variable "ret"
Date: Sat, 9 Apr 2022 16:32:52 +0800	[thread overview]
Message-ID: <20220409083254.9696-4-liangwenpeng@huawei.com> (raw)
In-Reply-To: <20220409083254.9696-1-liangwenpeng@huawei.com>

From: Guofeng Yue <yueguofeng@hisilicon.com>

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

Signed-off-by: Guofeng Yue <yueguofeng@hisilicon.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index cd87e6e86720..aa3eca16e04a 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3257,7 +3257,6 @@ static int hns_roce_v2_write_mtpt(struct hns_roce_dev *hr_dev,
 				  void *mb_buf, struct hns_roce_mr *mr)
 {
 	struct hns_roce_v2_mpt_entry *mpt_entry;
-	int ret;
 
 	mpt_entry = mb_buf;
 	memset(mpt_entry, 0, sizeof(*mpt_entry));
@@ -3296,9 +3295,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));
 	hr_reg_enable(mpt_entry, MPT_INNER_PA_VLD);
 
-	ret = set_mtpt_pbl(hr_dev, mpt_entry, mr);
-
-	return ret;
+	return set_mtpt_pbl(hr_dev, mpt_entry, mr);
 }
 
 static int hns_roce_v2_rereg_write_mtpt(struct hns_roce_dev *hr_dev,
-- 
2.33.0


  parent reply	other threads:[~2022-04-09  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-09  8:32 [PATCH for-next 0/5] RDMA/hns: Cleanup for removing redundant statements and judging return values Wenpeng Liang
2022-04-09  8:32 ` [PATCH for-next 1/5] RDMA/hns: Remove unnecessary check for the sgid_attr when modifying QP Wenpeng Liang
2022-04-09  8:32 ` [PATCH for-next 2/5] RDMA/hns: Remove unused function to_hns_roce_state() Wenpeng Liang
2022-04-09  8:32 ` Wenpeng Liang [this message]
2022-04-09  8:32 ` [PATCH for-next 4/5] RDMA/hns: Add judgment on the execution result of CMDQ that free vf resource Wenpeng Liang
2022-04-09  8:32 ` [PATCH for-next 5/5] RDMA/hns: Init the variable at the suitable place Wenpeng Liang
2022-04-12 13:42 ` [PATCH for-next 0/5] RDMA/hns: Cleanup for removing redundant statements and judging return values Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220409083254.9696-4-liangwenpeng@huawei.com \
    --to=liangwenpeng@huawei.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox