All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zhijian <lizhijian@fujitsu.com>
To: <haris.iqbal@ionos.com>, <jinpu.wang@ionos.com>,
	<linux-rdma@vger.kernel.org>
Cc: <jgg@ziepe.ca>, <leon@kernel.org>, <guoqing.jiang@linux.dev>,
	<linux-kernel@vger.kernel.org>,
	Li Zhijian <lizhijian@fujitsu.com>
Subject: [PATCH for-next v3 1/3] RDMA/rtrs: remove duplicate cq_num assignment
Date: Tue, 25 Apr 2023 01:02:41 +0000	[thread overview]
Message-ID: <1682384563-2-2-git-send-email-lizhijian@fujitsu.com> (raw)
In-Reply-To: <1682384563-2-1-git-send-email-lizhijian@fujitsu.com>

line 1701 and 1713 are duplicate:
> 1701         cq_num = max_send_wr + max_recv_wr;
 1702         /* alloc iu to recv new rkey reply when server reports flags set */
 1703         if (clt_path->flags & RTRS_MSG_NEW_RKEY_F || con->c.cid == 0) {
 1704                 con->rsp_ius = rtrs_iu_alloc(cq_num, sizeof(*rsp),
 1705                                               GFP_KERNEL,
 1706                                               clt_path->s.dev->ib_dev,
 1707                                               DMA_FROM_DEVICE,
 1708                                               rtrs_clt_rdma_done);
 1709                 if (!con->rsp_ius)
 1710                         return -ENOMEM;
 1711                 con->queue_num = cq_num;
 1712         }
> 1713         cq_num = max_send_wr + max_recv_wr;

Acked-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
V2: Add acked-by tags
---
 drivers/infiniband/ulp/rtrs/rtrs-clt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index 80abf45a197a..c2065fc33a56 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -1710,7 +1710,6 @@ static int create_con_cq_qp(struct rtrs_clt_con *con)
 			return -ENOMEM;
 		con->queue_num = cq_num;
 	}
-	cq_num = max_send_wr + max_recv_wr;
 	cq_vector = con->cpu % clt_path->s.dev->ib_dev->num_comp_vectors;
 	if (con->c.cid >= clt_path->s.irq_con_num)
 		err = rtrs_cq_qp_create(&clt_path->s, &con->c, max_send_sge,
-- 
2.29.2


  reply	other threads:[~2023-04-25  1:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25  1:02 [PATCH for-next v3 0/3] RDMA/rtrs: bugfix and cleanups Li Zhijian
2023-04-25  1:02 ` Li Zhijian [this message]
2023-04-25  1:02 ` [PATCH for-next v3 2/3] RDMA/rtrs: Fix the last iu->buf leak in err path Li Zhijian
2023-04-25  1:02 ` [PATCH for-next v3 3/3] RDMA/rtrs: Fix rxe_dealloc_pd warning Li Zhijian
2023-06-01 17:33   ` Jason Gunthorpe
2023-06-01 19:17     ` Jinpu Wang
2023-05-09  1:20 ` [PATCH for-next v3 0/3] RDMA/rtrs: bugfix and cleanups Zhijian Li (Fujitsu)
2023-05-09  7:59   ` Leon Romanovsky
2023-06-01 17:22 ` 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=1682384563-2-2-git-send-email-lizhijian@fujitsu.com \
    --to=lizhijian@fujitsu.com \
    --cc=guoqing.jiang@linux.dev \
    --cc=haris.iqbal@ionos.com \
    --cc=jgg@ziepe.ca \
    --cc=jinpu.wang@ionos.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.