diff options
author | Jing Xiangfeng <jingxiangfeng@huawei.com> | 2020-06-17 16:08:03 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-06-18 20:18:00 +0200 |
commit | a7ca4c3ebe6994ba88eb23576b2c3901b08e1dec (patch) | |
tree | a7937472d1ae28638ffecc32607b3ecbbfea25aa /drivers/infiniband/ulp | |
parent | Linux 5.8-rc1 (diff) | |
download | linux-a7ca4c3ebe6994ba88eb23576b2c3901b08e1dec.tar.xz linux-a7ca4c3ebe6994ba88eb23576b2c3901b08e1dec.zip |
IB/srpt: Remove WARN_ON from srpt_cm_req_recv
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.
Link: https://lore.kernel.org/r/20200617140803.181333-1-jingxiangfeng@huawei.com
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index ef7fcd3e8e15..0fa65c683f09 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", |