Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4094777rwl; Mon, 10 Apr 2023 06:11:12 -0700 (PDT) X-Google-Smtp-Source: AKy350ZCb6ZwJh5TulmNQi33a4QwwAw/qlt+yP/5n3KV9OG4x7/RkezIXNlKGgnNC0smF6hsh0wR X-Received: by 2002:a17:907:1ca3:b0:92e:eecf:b742 with SMTP id nb35-20020a1709071ca300b0092eeecfb742mr9033097ejc.2.1681132271996; Mon, 10 Apr 2023 06:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681132271; cv=none; d=google.com; s=arc-20160816; b=T4A/NcEZEZz32LLLA6Fu+Kkth61waSuyeWYfQbt/yUwyXB5yasziY+yOFWUVTLRmsa QLNeoozgVjY3F4xwBHPjEmet9n6j8k/3ttZoJlDSU4eglGjIYpqIWbP0BQLD/xezprKO 25Nyr8gTUb0irh6pZ7HuYcSdaZ6D4mPe4K494QrwE/JOXgmFQ3EMAE7nYnlTpoGnLEJZ dyibyS6sn4f4LW6Jthf04qohvIiwWDPhLQVQGZl0WERm3U7uWYPE4+cReANQTnIuL7Hp J2M0cQl8+/kCOUz721Vsl5e/tEVhlqfSPbWci6RXZKaxAvlLz4ceeX8PhKpVVL+9fuoO LTvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=/tPs1OQ8BAAD3WNg9n0ExU1NJO7zY3G3mT/LDJNv6Cw=; b=F5nyBbcmIB6CEDulDtmGWZzUDjfxgU8yGUv+cB2LEjyNxR3fEQtovprzYPLCTnISWj 5OI32SEARR8RMl+Uun2OC5IGCa366EB0F2H2asONwNrzYWiex3jwIkyYsShJWInn9Qt5 9tLTqCFEGFPbS1iSjd1ngSEOo76zMFxDvfQCH9mtCJBFz1WPVpe6R0sb/+dzk1byR5By z3aLRrG7m6UB5eKF+DlCA3a9jcuVI7scirJjd9jKATnrMfSkH1YJIDi5GR4Ik/zmzpBu xscqAeBYgVCoSnuCrx5DKcUjVwLsPaOnSfrOGJmVLMqJavcvLDW90bNWdb4ywrjJC9Jv Q8LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=bCF5ERnU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020aa7c246000000b00504a83d6791si1731226edo.391.2023.04.10.06.10.47; Mon, 10 Apr 2023 06:11:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=bCF5ERnU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229838AbjDJNKF (ORCPT + 99 others); Mon, 10 Apr 2023 09:10:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229825AbjDJNKD (ORCPT ); Mon, 10 Apr 2023 09:10:03 -0400 Received: from out-30.mta1.migadu.com (out-30.mta1.migadu.com [IPv6:2001:41d0:203:375::1e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E481D7EF2 for ; Mon, 10 Apr 2023 06:10:01 -0700 (PDT) Message-ID: <28516715-ed06-6ac2-d65c-551da18997a9@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1681132197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/tPs1OQ8BAAD3WNg9n0ExU1NJO7zY3G3mT/LDJNv6Cw=; b=bCF5ERnUV3owlJNw3RXQ0XoYAsibhHBQI/w3BB4oJyA2k/VpnpcSFa4Cx0F91cdMR6SMTv gg4KjNIA4ZyhUWrATKFgHa5H7eitSGlVfQDfAEa9FX4MnvA1To/owPydpuUHD4wbrRFQnO rBkRCURrSytHMzEatRbSkSlyGaUnvYw= Date: Mon, 10 Apr 2023 21:09:52 +0800 MIME-Version: 1.0 Subject: Re: [PATCH for-next 1/3] RDMA/rtrs: Remove duplicate cq_num assignment Content-Language: en-US To: Li Zhijian , haris.iqbal@ionos.com, jinpu.wang@ionos.com, jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org References: <1681108984-2-1-git-send-email-lizhijian@fujitsu.com> <1681108984-2-2-git-send-email-lizhijian@fujitsu.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Guoqing Jiang In-Reply-To: <1681108984-2-2-git-send-email-lizhijian@fujitsu.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/10/23 14:43, Li Zhijian wrote: > 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; > Signed-off-by: Li Zhijian > --- > 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, Acked-by: Guoqing Jiang Thanks, Guoqing