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 EEEA3439B8 for ; Wed, 24 Jan 2024 19:54:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D13DB42E07; Wed, 24 Jan 2024 19:54:37 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2052.outbound.protection.outlook.com [40.107.220.52]) by mails.dpdk.org (Postfix) with ESMTP id E211742DEE; Wed, 24 Jan 2024 19:54:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BgiAqyQvVPDCX3QwtsZe4+oM3Pm4bjP/TDVLAM4XzvuPivVfzzbiuGg/rnEhh/7SzR2Z0dGwwvl6QAdxq9P4iIaKj+06XcnMP+vEBXtwoDX779xRXzzoX26jREByJRyGI8OatU+WajX2rrP/PTa+VUXI9zbTgpMoNq+q+/hvkcaBQzXEzgPoRNNNtwAtIT3M6Nsg5Qucv6pVQRABfYs/drQGi4EPsknQwz6BbgmEtXdGlz77V8b7dgMElcRWgjgsHomWRehOyvNOJoJ404qI2dBuLu2LRh/t7Ms59PAB437ndAFznDfxhZkpwYPLpIr2ZaUGYEeMr3+H34F7gY6oLQ== 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=j//QIZ4a1UPHxBjO5L//WvG2RGtIXTnzyHONQn+GSNE=; b=bZZGv1Oipe+BDH2RGktB+G/28E1LEpD25PRTI+XRPqcU+JOTQqBkjXttLmy00pJr3pytYH/HwzM92IgcflP4+GxzJktYI69882X4CXXbiM0y07nPvrq0tL2TWGYmdVOCoCc6ek6Q0njMk9P/msEUpJ9Y4acs0fzAju4RFrc/56pQyuOYYC8ToQzxRZcg5jErkwGBTySQhYrXYxmnA/DGttGEOcoPJ89CFzlk6FJmDf7F4J//SYDImgTlcv7+IADFxvD2PKE4dmDWCXwxGlW8lAjWiFXG/q3NzvceeyUCnJEgRemcZUZGtgwY9vuKlo/WzzMP5JIHoPGknA/PhkqEBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=huawei.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=j//QIZ4a1UPHxBjO5L//WvG2RGtIXTnzyHONQn+GSNE=; b=Gacfsrax3eJ7jjlIO75bnFNcGglvBYNfjuYHtp5muoMCX8eleaNY/pSZlB+LPu59XEKVFs1pJtNywpGWsbZwcd6j74h3wHFR9IZvbzGn+TjDlYVRXtzNipPBomR1llric1YesDA1fvCqB2XnRhtDEv5yb7B6EP3UcZux28vcXbM= Received: from BYAPR01CA0017.prod.exchangelabs.com (2603:10b6:a02:80::30) by PH0PR12MB5434.namprd12.prod.outlook.com (2603:10b6:510:d5::8) 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::23) by BYAPR01CA0017.outlook.office365.com (2603:10b6:a02:80::30) 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:29 +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: Chengwen Feng , Kevin Laatz , Bruce Richardson , =?UTF-8?q?Morten=20Br=C3=B8rup?= CC: , Subject: [PATCH v2 5/8] dmadev: fix calloc parameters Date: Wed, 24 Jan 2024 18:54:02 +0000 Message-ID: <20240124185406.3598985-5-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_|PH0PR12MB5434:EE_ X-MS-Office365-Filtering-Correlation-Id: 68203232-e58d-4d1c-9319-08dc1d0de564 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AzSP4i+L57CUxLMyK0p8TNldb0fu7BwfKYIBasYLYrlRfbi9Nq9uirmtMG0k6k6maO0+kdS0ivgo2HCIt+jG+hqeSfPr6/9mGoEq2mBIy03ZlBlSX+vfISY13npibDRa6VGgFZqpA9m79nu5Aok4FE9gXN8Ns9b8exVOXNnUYL9cDblhR5e9Rt60TJPxNttDTJqQNt4RfpRE7791dcPDBteedX8M24VrKSFynLzV9HNXDaeSKG34QqX7zuxYhYzOtQKQWikw6cs1fk5+PhSmK89oMYA+gllc2GOQ0LQ2nDJa++2Z6Xh121pHGQTv0j+fAa5Pkoo78/NbE29XTTBd+mLQIomYDyrMqM6uJIvykg9i6incC/c401n6iaWRoli2iv6jnhoLSa0KtCnsTrYmZcunZ9s7ukHJhjazBX7yk1SIqcpvC3xJNwFZiMX2IxokFJ9186UL6ASjVsBjumZ37XpdXlEudJzWKB71e4aZ0o+KG+ZDS32biQNsksgSk3fvBMw1WPJiLmQkqA6IeOlqj/hQ+Qru6drt9LAmkSwxOPnIlu0i2apWmzr9WkvvnwRJvvTPjqFI98dyAhjTr4ymMafwrKBX6oNy3N5NbGCIO8FRisTiFgS0h6tMCgpks/lwJz5FObdeyLV0BVSbEYiX1B+TyE4pMtzaQBTcZ1hdWnTz/sLY9KGKjCQmLVQrk2UfJowex4Jzu2oYlhSefhzbISXIm/FQvxMzl+6zjXMv7Hpkw/xkOj/2wjbCjBM8Ej4Z+SICZBIKJXVhjhhqBFlRfNJUXWDzKLxZmG133MSiQxqZ/IQ++PtQG00i15ZXQrt6 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)(346002)(376002)(39860400002)(396003)(136003)(230922051799003)(230273577357003)(230173577357003)(82310400011)(1800799012)(64100799003)(451199024)(186009)(40470700004)(46966006)(36840700001)(4326008)(8676002)(81166007)(356005)(8936002)(110136005)(70586007)(70206006)(316002)(54906003)(86362001)(36756003)(2906002)(41300700001)(5660300002)(44832011)(40480700001)(40460700003)(7696005)(47076005)(6666004)(16526019)(26005)(478600001)(336012)(36860700001)(83380400001)(426003)(1076003)(82740400003)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 18:54:29.8871 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68203232-e58d-4d1c-9319-08dc1d0de564 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: PH0PR12MB5434 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 lib/librte_dmadev.a.p/dmadev_rte_dmadev.c.o ../lib/dmadev/rte_dmadev.c: In function ‘dmadev_handle_dev_dump’: ../lib/dmadev/rte_dmadev.c:1033:29: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 1033 | buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN); | ^~~~ Fixes: 94043b04212a ("dmadev: support telemetry dump dmadev") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: fengchengwen@huawei.com --- lib/dmadev/rte_dmadev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c index 5953a77bd6f9..c4e909270058 100644 --- a/lib/dmadev/rte_dmadev.c +++ b/lib/dmadev/rte_dmadev.c @@ -1030,7 +1030,7 @@ dmadev_handle_dev_dump(const char *cmd __rte_unused, if (*end_param != '\0') RTE_DMA_LOG(WARNING, "Extra parameters passed to dmadev telemetry command, ignoring"); - buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN); + buf = calloc(RTE_TEL_MAX_SINGLE_STRING_LEN, sizeof(char)); if (buf == NULL) return -ENOMEM; -- 2.34.1