Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3745897rwl; Sun, 9 Apr 2023 23:46:38 -0700 (PDT) X-Google-Smtp-Source: AKy350YtW6+53IDsKPl7f4XQzj0Kbf1TyvK17lLcHuZL/8ikq5WdleuNGeY5vK+8ZPvNHng93V3S X-Received: by 2002:a17:907:c20a:b0:94a:9abf:c3b with SMTP id ti10-20020a170907c20a00b0094a9abf0c3bmr918049ejc.75.1681109198052; Sun, 09 Apr 2023 23:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681109198; cv=none; d=google.com; s=arc-20160816; b=MQUZtPVMm6j9I1ZsVx5UUtgiTZ188sUnnPQAhYK/m5d7Uc6MjlgkN93epdri/HoCWf kQWzSSS6qbcatsOii5lI397iHJh76/L4rJ+nZwd5w+BW1tXKDSyd4OkwlUTB6HsSmk7Y yasUhwrMzdmlT+gNDTEHeLDwPIP/TmI6ApOBSV0S/oWMOe+tdrSnPwipIDqUsWQWF+Q2 Qt9HATEpmSQwnOspHvowPSnfmlMxDJV84AyqP7Kea5I9nfqxZLQAeSxMbOc6c5RUv8h6 S0pmw5C+qO6AVzLKzjyyL0vG4tOBPrMBrPJ88chV8p2IfKt5/RuIkrxK6alRES5UFMiZ 3jKw== 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=iAKmY6Rq8qBoVB2F0jD25UDcsKK0ZHwfKH5rHjKCtoI=; b=V2ualkVb4WuRc/JSx3efvJ4gkOq2rVWBmRiKD36lkNWNjU8yEptV1cjiQ8Rt6GsqjI 0q7JQ1aGC8A0xx5wZvCIKL1qx163eSsdiDcrYn+ShWs9o4RteDkF+hXuXYvmmK+HjWiu m2K3lAZH6xK0GGGfeFiYjBtG4DiwH/B06neHo4r/fuys6loAZrsOeFoWzLzCbeauzorz EXJ2BuE5wseoyn6JzIaKPi9Ux+NM/G6G7LSlzPa5EAMm1KIpBGkF4zS5LPPtZFonfMQ4 9DV2AhNXQmaFGzl0J4q0hp6Y7aAQi4y2Kp+j0NkGCvkN6e7i0iAbZAgIVO3Bvz3V9tiN 7FNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fujitsu.com header.s=170520fj header.b=iHXTs0Zo; 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 f7-20020a17090631c700b0093448e806d3si9729898ejf.85.2023.04.09.23.46.13; Sun, 09 Apr 2023 23:46:38 -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=iHXTs0Zo; 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 S229719AbjDJGnf (ORCPT + 99 others); Mon, 10 Apr 2023 02:43:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbjDJGne (ORCPT ); Mon, 10 Apr 2023 02:43:34 -0400 Received: from mail3.bemta32.messagelabs.com (mail3.bemta32.messagelabs.com [195.245.230.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD7402D47; Sun, 9 Apr 2023 23:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.com; s=170520fj; t=1681109011; i=@fujitsu.com; bh=iAKmY6Rq8qBoVB2F0jD25UDcsKK0ZHwfKH5rHjKCtoI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iHXTs0ZocBp7BXI9t24Fv1NRl28IFnlBd4lzD73WlPKfMulhkoW9ENvOzXXXYApMW 672Lpppw3M2SNmZ3kv6qjMLdGVaA6HUdItq6jk7c4olXvYHjFOOxu6CkuVgglvgC1I Fk3dw4HYjZvDUYNElXmqJWJiyCwHH9l+lHhP0St9J1ayFLxouCRmOPQ3shixL625et EtQW3/OSRImZzaY2yeDUHI0R+yRM1L4KVfH4zEHyzfv/uR9E92ISqb3tCzxTzTLqN1 bkbBCDXs/YYa5+fgvzoCgk5N0uEp/GyCnyUgiqFt2FNPT2W7xnWzkSTXebhSJXR7Lg jiSRBj2UP7y9A== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkleJIrShJLcpLzFFi42Kxs+GYpCu0wTj FYFevrMWNaXIW205vYLeYOeMEo8XbTVNYLKb8WspscXnXHDaLZ4d6WRzYPU6/ucPksWlVJ5vH woapzB6fN8l5bP18myWANYo1My8pvyKBNePs1Wa2gpfcFZen+TUwzuHoYuTiEBLYwiix/cwmF ghnOZPE50lbWSGc/UCZT/eZuhg5OdgENCTutdxkBLFFBEolDrftYwexmQWSJObdfssMYgsLeE usWXMYrJ5FQFXi8OXXbCA2r4CjxM7Fp8HiEgIKElMevger5xRwkmhovcgKYgsB1VxZ38gIUS8 ocXLmExaI+RISB1+8YIboVZQ40vmXBcKukGicfghqpprE1XObmCcwCs5C0j4LSfsCRqZVjKbF qUVlqUW6RnpJRZnpGSW5iZk5eolVuol6qaW65anFJbqGeonlxXqpxcV6xZW5yTkpenmpJZsYg bGRUszWvYNxfe9fvUOMkhxMSqK8XVzGKUJ8SfkplRmJxRnxRaU5qcWHGDU4OARmnJs7nUmKJS 8/L1VJgvf7AqA6waLU9NSKtMwcYPzClEpw8CiJ8J5YBpTmLS5IzC3OTIdInWJUlBLn/bUOKCE AksgozYNrg6WMS4yyUsK8jAwMDEI8BalFuZklqPKvGMU5GJWEeSeBjOfJzCuBm/4KaDET0GIu FwOQxSWJCCmpBiaO5dNF66uldyzz+sy0bdr61U2u158ZVpgs3Zf6wc//XZ8b214BW2tvI0Mf9 dN+6xhvNjzUuL7zGx9T4cP2bdLnVr09bNDukfb+8Z/Pk17tP/BqbXL5skJOtdt3c/9N2y/erK Tc+TG7qDjRdPr+RzeFKyPOaR5efED9d9S/OSnbX4ruXRia3LRpm4Bg0aR3RouvMDM+3rQhL5R XK8EpSqs34GPrBbscxvyHzM84T14rVnnPyej5iTnwoF74cs8Hbn8T5UJ916/6rb7pscPxX/Lm k9YlCM54GbslbSKL140zsZ1CxuWPvq4/Grcv85KgzQLdDrkPper1DTmmoXGaNoHrQ2X59h3hj Sri+flrroUSS3FGoqEWM9CZAMXtRZ+UAwAA X-Env-Sender: lizhijian@fujitsu.com X-Msg-Ref: server-15.tower-585.messagelabs.com!1681109010!186112!1 X-Originating-IP: [62.60.8.146] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.104.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 7567 invoked from network); 10 Apr 2023 06:43:30 -0000 Received: from unknown (HELO n03ukasimr02.n03.fujitsu.local) (62.60.8.146) by server-15.tower-585.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 10 Apr 2023 06:43:30 -0000 Received: from n03ukasimr02.n03.fujitsu.local (localhost [127.0.0.1]) by n03ukasimr02.n03.fujitsu.local (Postfix) with ESMTP id 10B55100323; Mon, 10 Apr 2023 07:43:30 +0100 (BST) Received: from R01UKEXCASM121.r01.fujitsu.local (R01UKEXCASM121 [10.183.43.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by n03ukasimr02.n03.fujitsu.local (Postfix) with ESMTPS id 021941000EE; Mon, 10 Apr 2023 07:43:30 +0100 (BST) Received: from 31d618797ed9.localdomain (10.167.226.45) by R01UKEXCASM121.r01.fujitsu.local (10.183.43.173) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 10 Apr 2023 07:43:26 +0100 From: Li Zhijian To: , , , , CC: , , Li Zhijian Subject: [PATCH for-next 1/3] RDMA/rtrs: Remove duplicate cq_num assignment Date: Mon, 10 Apr 2023 06:43:02 +0000 Message-ID: <1681108984-2-2-git-send-email-lizhijian@fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1681108984-2-1-git-send-email-lizhijian@fujitsu.com> References: <1681108984-2-1-git-send-email-lizhijian@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.226.45] X-ClientProxiedBy: G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) To R01UKEXCASM121.r01.fujitsu.local (10.183.43.173) X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE 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 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, -- 2.29.2