From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B5D32439B8 for ; Wed, 24 Jan 2024 19:54:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0870A42E0D; Wed, 24 Jan 2024 19:54:39 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2058.outbound.protection.outlook.com [40.107.94.58]) by mails.dpdk.org (Postfix) with ESMTP id 51C0F42E00; Wed, 24 Jan 2024 19:54:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PI7JG1IxuVsHynHPLg7JpnwAH0mSQl5b1jyHldWwwnUIVYLRVbsm3FmhhsQzCZXEzAwe3LEump2gAlAhWD8YTCDgOqED1g4H5Phdw8VJh48T+WkfJ1PBz9TxVnpb08ay8Pi3nMa138QDIxADwmpFEclVCR7xbMY6/1Pme7yDLpEsa/zENCL/hGnA761TASYIfKvsKg3rKzSaUm1qG0eyC7z3QYC9+asP4RG/eNkwqlaUZm+p7n4VP4Aol+IwtBTwY/Alxj9j2ra+LlGPARDByODYeYnhITGw9bFZVVplYtk0FaxOqj4FK0x/cf58fbwPOe/RmKDZLBJaqB/+nk3Z1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QTkHxtAAua37OagOJT4nnls1ahCleJbm6gpd8dGM4K0=; b=IKo8WWhRL6bMVqLLN7lcqkIxxo4N4MEeVNG+BUhF4HRzhmWVPuY4y2zT/jHOWJjNn5FTKklUpRXWpgNjs9sk4hOLLFKDgY+a1LKKSUMu8Ds6cnATrvkmJ21FlBwBrU9pMB3+JbXtqj+ow+pQUMpzKaU9zbrCD7KVHTmKgb5XfM6vREDqQCbbVfv6isqyc5E/6j2k+LUeQRtqV2sGGHGvuID7VG0B+j8YKEuDnjGOp5uuOsudAWVdBhP1NS20dYaH90oDGSIwAhrPPlRsrVyyGNMmS+pPjyWRyg8Zv7eCT9CW0d2L3Rx5ehmGndAH9CEQTjj8CfLa7zeUEZB3DgI2mQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nvidia.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QTkHxtAAua37OagOJT4nnls1ahCleJbm6gpd8dGM4K0=; b=u3xlQ6txfvd6DIjJ+c96rjStb+LdnFiJvXfTWMFsL1y0QQzH/agSTkNfgYN55O8mW8tMHenAoYjhqQsYO7DpUV9ViktBinaRAxrZHCSURN7F/jh+Ubdj7mrWsEzKEaQ4Lo5uLIpE7xksrJeOwJ5C36imRB3d9Pho1/B10+dxIc0= Received: from BYAPR01CA0021.prod.exchangelabs.com (2603:10b6:a02:80::34) by MN0PR12MB6271.namprd12.prod.outlook.com (2603:10b6:208:3c1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 18:54:31 +0000 Received: from SJ1PEPF00001CE9.namprd03.prod.outlook.com (2603:10b6:a02:80:cafe::8f) by BYAPR01CA0021.outlook.office365.com (2603:10b6:a02:80::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22 via Frontend Transport; Wed, 24 Jan 2024 18:54:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00001CE9.mail.protection.outlook.com (10.167.242.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Wed, 24 Jan 2024 18:54:31 +0000 Received: from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 24 Jan 2024 12:54:28 -0600 From: Ferruh Yigit To: Dariusz Sosnowski , Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad , Dmitry Kozlyuk CC: , , Subject: [PATCH v2 6/8] common/mlx5: fix calloc parameters Date: Wed, 24 Jan 2024 18:54:03 +0000 Message-ID: <20240124185406.3598985-6-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240124185406.3598985-1-ferruh.yigit@amd.com> References: <20231102130847.3367102-1-ferruh.yigit@amd.com> <20240124185406.3598985-1-ferruh.yigit@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE9:EE_|MN0PR12MB6271:EE_ X-MS-Office365-Filtering-Correlation-Id: 504b38c0-63db-45ab-9c13-08dc1d0de650 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ulR+KoR10NFLCz/D9tpI5XyLL4h9VV5l5FLCT5/k2ItmryuAwmHmSmy5jvatHf6ZMd0Frgw1DYznQf3VcN20WXUDT5Y8DGNSfQ8WTn74UJlF1KgFMBKEbgSJybM/HbSAo/i3F3ffGVbHMz0kHHm2scx0I7nEXI0Pq4RU7bhkRSi9sCrPfVpaoeINpXk7Uqa889xN3K8Iasg1xtAfSVEi9KU+TvvIBCvyNUws9HMK/Cqs4qsM9g38pK8WnjyvgL2CxDPkgh+UDnWbhgXkPqMRpOr+P/88mY2lwsq/MEoi58Dm9zq+D14Y0JYtV3pi72eX60Pw2/tofXhlpqjNga+CKnHFX5QH1l4O0jGcb7nFSeBFpDptoGSlsQWM6HiftJ2x2V0rakSBH27jiN17PEWjRyDNgA36YwzRLJi105yZqeDB40uUWO5pnHd2RSZmV91s4ZzU3KsgSnqvyWfwR9cMS08KmwaZvyiIvCFIj3IdU3e14eN58tAbrb3OVPqq1AuEKy/OMBX98YhxRHiDpGSOsFxsaj0Q52K8GwmCPm2z8DNfHpCvoBzJAI1jOy7PD5CzxhPwbWIMSp5xjJiYAPqACdvk74gnnf9cNG5AiTnakSCgMHA1k4M3vFnv4amZ02XNtObEkKGZKWoFSqXottRNEujyne5K42U2AwWYWJwp+vZjbszHQReUF88oXn6KbDvvsiUHexCT/ktjeeqFAUOokUSJiaThbqrUFSmflAsmIWW/FgL9+1xU6uwCga0cwVG7o2uSet63oZIYDu8P8c2V5SqF1JXWmmJjflIq80FHdGczLwVFIstscdZiLd/EZe9H X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(39860400002)(396003)(346002)(136003)(230922051799003)(230173577357003)(230273577357003)(1800799012)(64100799003)(186009)(451199024)(82310400011)(46966006)(40470700004)(36840700001)(86362001)(36756003)(40480700001)(40460700003)(356005)(70586007)(54906003)(316002)(82740400003)(81166007)(1076003)(70206006)(83380400001)(2616005)(7696005)(336012)(6666004)(16526019)(426003)(41300700001)(478600001)(8676002)(44832011)(8936002)(26005)(4326008)(5660300002)(2906002)(36860700001)(110136005)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 18:54:31.4340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 504b38c0-63db-45ab-9c13-08dc1d0de650 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CE9.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6271 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org gcc [1] generates warning [2] about calloc usage, because calloc parameter order is wrong, fixing it by replacing parameters. [1] gcc (GCC) 14.0.1 20240124 (experimental) [2] Compiling C object .../common_mlx5_mlx5_common_mr.c.o .../mlx5/mlx5_common_mr.c: In function ‘mlx5_mempool_get_chunks’: .../common/mlx5/mlx5_common_mr.c:1384:29: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 1384 | *out = calloc(sizeof(**out), n); | ^ Fixes: 7297d2cdecce ("common/mlx5: fix external memory pool registration") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: dkozlyuk@nvidia.com --- drivers/common/mlx5/mlx5_common_mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_common_mr.c b/drivers/common/mlx5/mlx5_common_mr.c index 40ff9153bd8e..85ec10d2ee36 100644 --- a/drivers/common/mlx5/mlx5_common_mr.c +++ b/drivers/common/mlx5/mlx5_common_mr.c @@ -1381,7 +1381,7 @@ mlx5_mempool_get_chunks(struct rte_mempool *mp, struct mlx5_range **out, DRV_LOG(DEBUG, "Collecting chunks of regular mempool %s", mp->name); n = mp->nb_mem_chunks; - *out = calloc(sizeof(**out), n); + *out = calloc(n, sizeof(**out)); if (*out == NULL) return -1; rte_mempool_mem_iter(mp, mlx5_range_from_mempool_chunk, *out); -- 2.34.1