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 1/5] RDMA/hns: Remove unnecessary check for the sgid_attr when modifying QP
Date: Sat, 9 Apr 2022 16:32:50 +0800 [thread overview]
Message-ID: <20220409083254.9696-2-liangwenpeng@huawei.com> (raw)
In-Reply-To: <20220409083254.9696-1-liangwenpeng@huawei.com>
From: Chengchang Tang <tangchengchang@huawei.com>
The sgid_attr cannot be null in this scenario. This judgment is redundant.
Fixes: 606bf89e98ef ("RDMA/hns: Refactor for hns_roce_v2_modify_qp function")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 2b0cef17ad45..cd87e6e86720 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4966,9 +4966,7 @@ static int hns_roce_v2_set_path(struct ib_qp *ibqp,
if (ret)
return ret;
- if (gid_attr)
- is_udp = (gid_attr->gid_type ==
- IB_GID_TYPE_ROCE_UDP_ENCAP);
+ is_udp = (gid_attr->gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP);
}
/* Only HIP08 needs to set the vlan_en bits in QPC */
--
2.33.0
next prev parent reply other threads:[~2022-04-09 8:33 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 ` Wenpeng Liang [this message]
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 ` [PATCH for-next 3/5] RDMA/hns: Remove redundant variable "ret" Wenpeng Liang
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-2-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