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 B731D439B8 for ; Wed, 24 Jan 2024 19:54:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BA9442DF8; Wed, 24 Jan 2024 19:54:36 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 5BDD742DED; Wed, 24 Jan 2024 19:54:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ivme4sOaT4GYriilmNfkTOTv9pw8pP5DtFJdP3GjSzOPz/fzybps/26+/BQCX2lwuGn879PZv0ewbWQV1fn35MlAi/mbyuA6fwCFaTecyNZLwob1h4WILAnN1BWpsx0ub2AP8l2o8FLahzKfxHJtlb1jZUiCrXIUUaDco8I8/sM3pEwaGTNHHn5MdVF6pk4qhfllwKq0OdplCXm8YjHEZPOHOthMMMs/kp3WhNb7eA/cyviiFear6fTy6zpKUw3P8aYhUwFMUzF8zwv2bgPztzJr53tyN/WYGbvAu+NDfujqm1C3Aj2EJQr9OOEf4ApQ9ho7mYQxtv4WXXvBCwmDxQ== 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=XM7t+gR6ZlOI+5qAOnQ1rMErFf3l20jTTGOtlY6jbek=; b=mJugPEDExLkFU6soZbMacrPBB4EUaaqwyPHtDFAQ7EEeemWaI4eALeLqHU1ryWDB7w4X171rKXBbGL59AhVbTq3nS3slKwAjeHKUAV3deJfWuUEna0ELn+xf+PRzJ2q5MizIkU7PlH38A7ouu8Edvxdv4vrGTpWBTqlUkZCejfu4s+7uVM797AHpkQt0nbUn7euosBzyW+WYFe4+dfsSiRRUmtkfu3vazXY92U/RDf8xhya7veef6Wtgu/VkEhMMov+3HawOujvj1/FMIRh5gqGtpCBxHuxElvKHT1xXJjHrpgSH9coJjwK4wg+NLvEF0WoXP34d3QUhlBRyGBUmeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=marvell.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=XM7t+gR6ZlOI+5qAOnQ1rMErFf3l20jTTGOtlY6jbek=; b=UL7O3ymP2upgPAZf9VG2PwLXOUNaTRlEpPsmlgN4kqOgsBLY3cDwSbk7kZdYgyozldubflj4jtggBePKLlOi0Ohii2iJNyP+61ftUWoG2H/Z+sHxxSDDexDG0mlXYFRX8yYIeXiEblWHQJquKh3bvL+io6lRXtJsgvX64m7/QEQ= Received: from BYAPR01CA0035.prod.exchangelabs.com (2603:10b6:a02:80::48) by DS7PR12MB8290.namprd12.prod.outlook.com (2603:10b6:8:d8::15) 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:29 +0000 Received: from SJ1PEPF00001CE9.namprd03.prod.outlook.com (2603:10b6:a02:80:cafe::4f) by BYAPR01CA0035.outlook.office365.com (2603:10b6:a02:80::48) 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:29 +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:27 -0600 From: Ferruh Yigit To: Jerin Jacob , Chengwen Feng , =?UTF-8?q?Morten=20Br=C3=B8rup?= CC: , Subject: [PATCH v2 4/8] eventdev: fix calloc parameters Date: Wed, 24 Jan 2024 18:54:01 +0000 Message-ID: <20240124185406.3598985-4-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_|DS7PR12MB8290:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f47a3cf-3bae-48be-21dc-08dc1d0de4f2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BpKPyVwF63Ui5XzeiX8kfveAQN9+Hbs1qB/3wQ7kwHo+mWERxtNM0dKERjCj71UUE19suXCDKUjFq8mfkZt3QV4Ga78ldXoULJ9eTvqQxP90u3/0gjS19EscZ1dWv1w1+b9xkoXmdEJQb3Qg34mGMEtfC6mWcxrep4YcnNAzhDRFxqE4HR9QqggH1hepe8AsB08Olss5C1AwMdWtCtI+ngJWnSa/o3dVr1b1W32lliMgeTY2rzW6cAlGeN1MTONOX5Hc0tO1GR052JBSYPMCW2rocRND9y930iakwbb+PA0IBGrHj5MoqEvftUCRnVGVgo0p+ue8y3SppEGHgh/ByP77uMBgpP/wQ5QLU7mBgGny8eSuWJqsbtczB4LjgZlCyTQ6G5XCa5sZo3y+b2QK/FKp2jwuiJU5rBuyyWwDb9s55RsfeORxGeTKLe2mOXjIvaM50VZvuFAFOVxGlJTVSKjEhtyH+AE2pyyrJ2aWfv2wJyqshKrF99t/YZm6MDjVhoU63NgR9ZhixTzRhuzOxvDGKhODdCtl/qjCKq5LJMME1FiiGcffynCDFETB1GlWL5WKlFxwxAK77XiWSw6yosxqm0plS6t2UM92AByIyZ1TgmA4Pw9F3bHhWt73UfXCMwZMOYL4Ox+c3naJxELT3OsLv1IFhb3LM96aN+J/qW0P96Sp3xZJnMtAB3Y/llbWC4uokzW3dOnyfPuluw/BDK1legzUdbBJaE+dxW/WdHA6PWyQ8EDIL59s5S0szAi2aODWdhhCk5XZTkxGa5JARSE19ohyDDLw0yvn5hMxyCbDWimibJ7GkcIAmuOEj8/d 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)(396003)(376002)(136003)(39860400002)(346002)(230173577357003)(230922051799003)(230273577357003)(82310400011)(1800799012)(64100799003)(451199024)(186009)(40470700004)(36840700001)(46966006)(40460700003)(40480700001)(83380400001)(47076005)(36756003)(86362001)(356005)(81166007)(26005)(41300700001)(7696005)(1076003)(2616005)(336012)(16526019)(426003)(36860700001)(54906003)(478600001)(6666004)(70206006)(110136005)(70586007)(82740400003)(316002)(4326008)(2906002)(8936002)(44832011)(5660300002)(8676002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 18:54:29.1371 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6f47a3cf-3bae-48be-21dc-08dc1d0de4f2 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: DS7PR12MB8290 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_eventdev.a.p/eventdev_rte_eventdev.c.o ../lib/eventdev/rte_eventdev.c: In function ‘handle_dev_dump’: ../lib/eventdev/rte_eventdev.c:2005:29: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 2005 | buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN); | ^~~~ Fixes: a3b7b476d723 ("eventdev: support telemetry dump eventdev") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: fengchengwen@huawei.com --- lib/eventdev/rte_eventdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c index 157752868d5b..1c865e993fec 100644 --- a/lib/eventdev/rte_eventdev.c +++ b/lib/eventdev/rte_eventdev.c @@ -2002,7 +2002,7 @@ handle_dev_dump(const char *cmd __rte_unused, RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); - 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