Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6311827rwr; Mon, 24 Apr 2023 18:05:16 -0700 (PDT) X-Google-Smtp-Source: AKy350ZHF6Pbp5CEdEZJJWJgrI+ocu94utTwgxOnACg6PhChzrfAyk/T7P4n+AAYIwk5XP7hQaZn X-Received: by 2002:a17:90b:1c8f:b0:249:822d:e5bc with SMTP id oo15-20020a17090b1c8f00b00249822de5bcmr14479765pjb.5.1682384716276; Mon, 24 Apr 2023 18:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682384716; cv=none; d=google.com; s=arc-20160816; b=dTNSDKCkG4dmS+Meh3OZ4Z8OUX9hxjuX6GuChz0UWsYl+yag4Z66Ds7UzX0NPFWx0n GuFPlOke2Jsvpw/dNOCF7vjuu4bfy7wNQxAHwlkb0Lg4IuCxK9zH+aE4tj/r11CdVgnb jOnPCZQ1IaZvlKzQb2MFk965ed33h/A7FmU3qDjloSn0Xy271KPshCOyuWsIgl8hw433 aZR3HFs1wq+m8YUktU514Du/UFns5SrJT57yQmFx0wDs/joXSfuojiyAqlyhhU4Zt/26 VOadYy9Jky8XVDIA/rahaST4Ky4M4gPuZQna2QGHx0FaZ0HVUlFDVq6G56MEFPRLglKn V2CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=O0kcifYVmFdHHYe5snDPuVQyH9cIgfpR9XX11fi5kg0=; b=KcKMd+GK4HbUxo09/NxruVylc+ziEF2XGWRASCCHH33ocsGhrLQzWu9adbt0lnOxGf jXPO+9BjaMC9lZE3AKMT8rp5avod2M6thn/L2xZBFX2tA8Ix9Ty3shPea8u0F8vhPyY6 dLPzAz+DHr7/wt9BzbQDALJjHzfjDm0tuyrxEe6nc2NE3RX5+yZP+pfr1mp/2v1TKEr+ owgk2WqPHTTeZYRL1YehFoKsWc6xU03mw54fZfktwRUOJlKjLXJLTRhebtGchG7GcTnR kChI7pI4ctfL5ea6DG5VU3tTLRXuJtTimBBhBNU7C6LvMpB6uc9DDl+jUzu40/Ia4Rpy 3FEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fujitsu.com header.s=170520fj header.b=Rze6ebYe; 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=fujitsu.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 40-20020a17090a0fab00b00230ba341251si15225045pjz.82.2023.04.24.18.05.02; Mon, 24 Apr 2023 18:05:16 -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=@fujitsu.com header.s=170520fj header.b=Rze6ebYe; 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=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232797AbjDYBEo (ORCPT + 99 others); Mon, 24 Apr 2023 21:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232617AbjDYBEl (ORCPT ); Mon, 24 Apr 2023 21:04:41 -0400 Received: from mail1.bemta37.messagelabs.com (mail1.bemta37.messagelabs.com [85.158.142.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02A65AF1C; Mon, 24 Apr 2023 18:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.com; s=170520fj; t=1682384663; i=@fujitsu.com; bh=O0kcifYVmFdHHYe5snDPuVQyH9cIgfpR9XX11fi5kg0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Rze6ebYeALFG9TUcby0W6ULkEIr4nHyRqKYwc9ftk2R2Eg2tTKIbov60gm6t/uQuX 9oWU3jNapo+UGrczav8gYbxbs26sXgAv2MmbWkpxGRkefzzKrDK+9Qx7Ca1gzc2ybg wXcxb1B5XmtnDetXGWQFDuT0LbZ8ivW1shPvCfrz7b3HLp6AxPiD2QW0JLQkegv9S4 zaB/SquLdFR1bgb00H2AdCFQ2GVPpvO98F4c61+RvaBQH4tq6awGHV3RUHl7rFw6un VyE6wpri8tyuWQ7EffJOqLQRV2BXSCymgcVf79bkADr8IB7zF8Cf4Gop7Zsub6BHkz mu7SrCUt3bbVQ== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmleJIrShJLcpLzFFi42Kxs+HYrCuq7p5 icPqPlcWNaXIW205vYLeYOeMEo8XbTVNYLKb8WspscXnXHDaLZ4d6WRzYPU6/ucPksWlVJ5vH woapzB6fN8l5bP18myWANYo1My8pvyKBNaPl/Vfmggc8FVcWfGZuYGzj7GLk4hAS2Mgosev8N WYIZymTRNOay1DOQUaJG6s3sXUxcnKwCWhI3Gu5yQhiiwgESSxd85oJpIhZoJVR4kjTJGaQhL CAn8SHV7fAGlgEVCXu3H8CZHNw8Ao4SmzblQgSlhBQkJjy8D1YOaeAk8Smt51g5UJAJVM232A BsXkFBCVOznwCZjMLSEgcfPGCGaJXSeLi1zusEHalROuHXywQtprE1XObmCcwCs5C0j4LSfsC RqZVjGbFqUVlqUW6ZnpJRZnpGSW5iZk5eolVuol6qaW6eflFJRm6hnqJ5cV6qcXFesWVuck5K Xp5qSWbGIHxkVKcbLeD8cvOv3qHGCU5mJREebnC3FKE+JLyUyozEosz4otKc1KLDzFqcHAIzD g3dzqTFEtefl6qkgRvrLJ7ipBgUWp6akVaZg4whmFKJTh4lER4lyoBpXmLCxJzizPTIVKnGBW lxHllVYESAiCJjNI8uDZY2rjEKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZiXQQFoCk9mXgnc 9FdAi5mAFu/idgFZXJKIkJJqYMpqmbGrMH/tw4WXZtdZl59S5ZhyWbv0fJJS0cqt/d4ydttEQ 7My/Sa/m3kj5oBN5cMDPvNmCQXzMSxJFhdq8shf5x95Sqb0fPtlVmPep7p/1MPYK20DBW7f1h O2cFmm9cfZ6mDpxUmlnAsFoyUWLUq9kam5TvCAajx3QIXcrEXvdb9HJk+68ctvxcZTO18LvrJ gYgngDdTQzDi/U0NImXXC91f338VP37Buvr7c7/cW8vOO3/IpKWA3u/WU+fg2c5f1+1n8YpaL M39o3/qqeIP5hl2rtIJXCWsuuJFq+Ud21e+Ndb85NKrtvyU3OB8Pnm76afqkNQGdbI6CLqteL rzUxb/h+7uvkbvWRu0oiFViKc5INNRiLipOBACNVWSulgMAAA== X-Env-Sender: lizhijian@fujitsu.com X-Msg-Ref: server-4.tower-745.messagelabs.com!1682384661!376981!1 X-Originating-IP: [62.60.8.179] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.104.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22786 invoked from network); 25 Apr 2023 01:04:21 -0000 Received: from unknown (HELO n03ukasimr04.n03.fujitsu.local) (62.60.8.179) by server-4.tower-745.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 25 Apr 2023 01:04:21 -0000 Received: from n03ukasimr04.n03.fujitsu.local (localhost [127.0.0.1]) by n03ukasimr04.n03.fujitsu.local (Postfix) with ESMTP id 6226815B; Tue, 25 Apr 2023 02:04:21 +0100 (BST) Received: from R01UKEXCASM223.r01.fujitsu.local (R01UKEXCASM223 [10.182.185.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by n03ukasimr04.n03.fujitsu.local (Postfix) with ESMTPS id 5629D142; Tue, 25 Apr 2023 02:04:21 +0100 (BST) Received: from 0819309620d6.localdomain (10.167.234.230) by R01UKEXCASM223.r01.fujitsu.local (10.182.185.121) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 25 Apr 2023 02:04:17 +0100 From: Li Zhijian To: , , CC: , , , , Li Zhijian Subject: [PATCH for-next v3 1/3] RDMA/rtrs: remove duplicate cq_num assignment Date: Tue, 25 Apr 2023 01:02:41 +0000 Message-ID: <1682384563-2-2-git-send-email-lizhijian@fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1682384563-2-1-git-send-email-lizhijian@fujitsu.com> References: <1682384563-2-1-git-send-email-lizhijian@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.234.230] X-ClientProxiedBy: G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) To R01UKEXCASM223.r01.fujitsu.local (10.182.185.121) X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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 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 Acked-by: Jack Wang Signed-off-by: Li Zhijian --- 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