* [PATCH v3] IB/srpt: Remove WARN_ON from srpt_cm_req_recv
@ 2020-06-17 14:08 Jing Xiangfeng
2020-06-18 14:03 ` Bart Van Assche
2020-06-18 18:18 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Jing Xiangfeng @ 2020-06-17 14:08 UTC (permalink / raw)
To: bvanassche, dledford, jgg
Cc: linux-rdma, target-devel, linux-kernel, linux-mm, jingxiangfeng
The callers pass the pointer '&req' or 'private_data' to
srpt_cm_req_recv(), and 'private_data' is initialized in srp_send_req().
'sdev' is allocated and stored in srpt_add_one(). It's easy to show that
sdev and req are always valid. So we remove unnecessary WARN_ON.
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index ef7fcd3..0fa65c6 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -2156,9 +2156,6 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev,
WARN_ON_ONCE(irqs_disabled());
- if (WARN_ON(!sdev || !req))
- return -EINVAL;
-
it_iu_len = be32_to_cpu(req->req_it_iu_len);
pr_info("Received SRP_LOGIN_REQ with i_port_id %pI6, t_port_id %pI6 and it_iu_len %d on port %d (guid=%pI6); pkey %#04x\n",
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] IB/srpt: Remove WARN_ON from srpt_cm_req_recv
2020-06-17 14:08 [PATCH v3] IB/srpt: Remove WARN_ON from srpt_cm_req_recv Jing Xiangfeng
@ 2020-06-18 14:03 ` Bart Van Assche
2020-06-18 18:18 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2020-06-18 14:03 UTC (permalink / raw)
To: Jing Xiangfeng, dledford, jgg
Cc: linux-rdma, target-devel, linux-kernel, linux-mm
On 2020-06-17 07:08, Jing Xiangfeng wrote:
> The callers pass the pointer '&req' or 'private_data' to
> srpt_cm_req_recv(), and 'private_data' is initialized in srp_send_req().
> 'sdev' is allocated and stored in srpt_add_one(). It's easy to show that
> sdev and req are always valid. So we remove unnecessary WARN_ON.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] IB/srpt: Remove WARN_ON from srpt_cm_req_recv
2020-06-17 14:08 [PATCH v3] IB/srpt: Remove WARN_ON from srpt_cm_req_recv Jing Xiangfeng
2020-06-18 14:03 ` Bart Van Assche
@ 2020-06-18 18:18 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-06-18 18:18 UTC (permalink / raw)
To: Jing Xiangfeng
Cc: bvanassche, dledford, linux-rdma, target-devel, linux-kernel, linux-mm
On Wed, Jun 17, 2020 at 10:08:03PM +0800, Jing Xiangfeng wrote:
> The callers pass the pointer '&req' or 'private_data' to
> srpt_cm_req_recv(), and 'private_data' is initialized in srp_send_req().
> 'sdev' is allocated and stored in srpt_add_one(). It's easy to show that
> sdev and req are always valid. So we remove unnecessary WARN_ON.
>
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ---
> 1 file changed, 3 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-18 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 14:08 [PATCH v3] IB/srpt: Remove WARN_ON from srpt_cm_req_recv Jing Xiangfeng
2020-06-18 14:03 ` Bart Van Assche
2020-06-18 18:18 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).