diff options
author | Li Zhijian <lizhijian@fujitsu.com> | 2022-08-01 08:43:46 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-08-02 20:10:55 +0200 |
commit | 6b822d408b58c3c4f26dae93245c6b7d8b39e0f9 (patch) | |
tree | e1ab91f87dbcfda0a0c8e490df6ac9de8f799793 /drivers/infiniband/ulp | |
parent | RDMA/rxe: Fix error unwind in rxe_create_qp() (diff) | |
download | linux-6b822d408b58c3c4f26dae93245c6b7d8b39e0f9.tar.xz linux-6b822d408b58c3c4f26dae93245c6b7d8b39e0f9.zip |
RDMA/ib_srpt: Unify checking rdma_cm_id condition in srpt_cm_req_recv()
Although rdma_cm_id and ib_cm_id passing to srpt_cm_req_recv() are
exclusive currently, all other checking condition are using rdma_cm_id.
So unify the 'if' condition to make the code more clear.
Link: https://lore.kernel.org/r/1659336226-2-1-git-send-email-lizhijian@fujitsu.com
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/srpt/ib_srpt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index c3036aeac89e..21cbe30d526f 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -2218,13 +2218,13 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev, ch->zw_cqe.done = srpt_zerolength_write_done; INIT_WORK(&ch->release_work, srpt_release_channel_work); ch->sport = sport; - if (ib_cm_id) { - ch->ib_cm.cm_id = ib_cm_id; - ib_cm_id->context = ch; - } else { + if (rdma_cm_id) { ch->using_rdma_cm = true; ch->rdma_cm.cm_id = rdma_cm_id; rdma_cm_id->context = ch; + } else { + ch->ib_cm.cm_id = ib_cm_id; + ib_cm_id->context = ch; } /* * ch->rq_size should be at least as large as the initiator queue |