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 8C653439B8 for ; Wed, 24 Jan 2024 19:54:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE2A642E03; Wed, 24 Jan 2024 19:54:37 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2062.outbound.protection.outlook.com [40.107.220.62]) by mails.dpdk.org (Postfix) with ESMTP id CEE0842DED; Wed, 24 Jan 2024 19:54:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AMGbznLP8OKdtv+tQIGHMGasDJHUgQgKmKkM/xsX64tW5Xk/X9o0GBeFt3YyOX7yrZKXf3rZ4bUMgTf6wEXhxY3GXJxGlPfiHKHhv51x5H3vv4twvL654aJ6fzbL/i+AVZfmZzqbBpJ3spYlsJt7HuX+eJ8jdlhWx3s85Kpkn4cfX2nO/OvyOxMZsIGPmRnjIqkvNkziXmfPLJMGlQjAza+NianUaF6oXHB5Xk3t98U3LO3C28ziKhf8lxhZhV4gRcT15fWbhOCmO/79BpCn+HiNs5IqJKhTL/BC6V8pAO9sys6dXIXVhWaB8yZk98O1V9/m5Azy3Xdqlbm96S2NUA== 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=URBG7bvcxDPTQL1AWM8RSpnUkGuKS92/drQ1thPOb7Q=; b=drHj3h7zjV8DpV9r7wCNLPRk4Iw2rnWwaBvgB9AJmzm8YS5rEOQK0kox+u6pQslxUs2+0mIRccM/uajRplxy6QAUJYyJ38xFrhxZ8xrwFenFFx1hCT3wBFF1JTebGOZzY088vBY8e5/0YX6AbZmKes2YmKZOWbVhK+Y0ALKoK+M1fzRU+bnjQYhY8zdaRfVnmDJD+yUP29sJBKZzpqHWvGaJrXLMF1CGhiKCjNm7NRyop9lK6/aGFB+TC0Jw/6oQGjTXikSCA10Fg1YhW9saYrGdGEJ30D7XUv+fcW/+retN0SgpYMaEUl5t2iLcMtYZCSaKVqu5cYW6EQX+/9T0+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=nxp.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=URBG7bvcxDPTQL1AWM8RSpnUkGuKS92/drQ1thPOb7Q=; b=O3/8jH1epXneAVg9fXE3urniNwJ3tdE8uupbRMRJPM8Ai9vON4xzWZ1i8SzPI0CfuX2k3ru8HCDT0TtjXkGATzAUs0t+fVT8q+429fsF5AEXm8n2yptRQl11PQXH9dmQ0j3yZR7f51HN7iWUoyJj85EKu1YeU15qed4FjWbeyMc= Received: from BYAPR01CA0004.prod.exchangelabs.com (2603:10b6:a02:80::17) by MN2PR12MB4584.namprd12.prod.outlook.com (2603:10b6:208:24e::11) 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:28 +0000 Received: from SJ1PEPF00001CE9.namprd03.prod.outlook.com (2603:10b6:a02:80:cafe::9e) by BYAPR01CA0004.outlook.office365.com (2603:10b6:a02:80::17) 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:28 +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:28 +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:26 -0600 From: Ferruh Yigit To: Sachin Saxena , Hemant Agrawal , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Chengwen Feng CC: , Subject: [PATCH v2 3/8] rawdev: fix calloc parameters Date: Wed, 24 Jan 2024 18:54:00 +0000 Message-ID: <20240124185406.3598985-3-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_|MN2PR12MB4584:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c08892f-4413-4bcb-62be-08dc1d0de471 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EfE7+e0uVf8eRu9nWcNWa2sISNTLonZaxYEdkNmsCedJccl2JIn71DocGZSeUX8ipdQxSlqoehAIfG1WPBVOgraEmCCiF/VoLTj9YVdJR9NJdhvz2N/PAZzAplI49NQKwbt9LW5AhlnqRRzVE27Cbw8eDGYgngJYSnGC/Ewx2zlYRklqLmpJFc0XQx8CXoJXt05iFSjppZ7Iy8qFr3noq7Yb+TGBE/a5021tDUKbcGjL8YUnsSJGtKIAAVPLi5VH51SLyBNSBICJ80X7TQ4pKd7aCPeZpCY0vuD/nlDvNYpYCD92XwIkQYpBzmxEE61JEWx1toKSXjnJ4mt1mc0lk1efvH3+Rj0tKTE3dl+gHhAwzXrvEjV6JDE+PYeLccKs/s7MSAgSPbEpU4eCTtA5WppIyXVxnFkkaqdEZAfSRhITOfn9uhOEYwLQJcNSUxYjvbm0NWRPYO0G2BM8n+OPL+Yt7MpJ4Xtltm5+FR930PQPcws4C/smT5g/miMB4ejDIlKX/ULsUOC6vYReS9qSpcYZoV/wKE4E9/n/ruBURzWArGrxUn6/5bgAgQOSQTsdz3Yt+VNALWTOIV///tgTUxEt1KkPj+F6Iz+i7lO63fWXKyUJDNCUDa9tTXyR4+NqpCQW5roAMMjwfqMEzfKpvQUwKfKorQafnUjpk3R/VAzCfwe/YBUbeZKDm8b2tn9zykyH3jUP+VJMdsr/KuPYrHKQ011UrDKJiOvZ0tH86zfbxzFUf+mrNPblq/bl+F24YxQMzboz+gRa0FaCplp+fFjmb7CKOqQ3pIvC7yHvM+KfBqCInTNR68CpKurdmsOq 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)(136003)(346002)(39860400002)(376002)(230922051799003)(230173577357003)(230273577357003)(451199024)(186009)(1800799012)(82310400011)(64100799003)(40470700004)(46966006)(36840700001)(4326008)(8676002)(8936002)(36756003)(2906002)(7696005)(426003)(336012)(83380400001)(44832011)(2616005)(16526019)(26005)(5660300002)(1076003)(110136005)(478600001)(86362001)(41300700001)(70586007)(70206006)(6666004)(54906003)(356005)(316002)(47076005)(81166007)(40480700001)(40460700003)(36860700001)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 18:54:28.2778 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7c08892f-4413-4bcb-62be-08dc1d0de471 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: MN2PR12MB4584 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.0 20240108 (experimental) [2] Compiling C object .../lib/librte_rawdev.a.p/rawdev_rte_rawdev.c.o ../lib/rawdev/rte_rawdev.c: In function ‘handle_dev_dump’: ../lib/rawdev/rte_rawdev.c:659:29: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 659 | buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN); | ^~~~ Fixes: e915d404eb72 ("rawdev: support telemetry dump rawdev") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: fengchengwen@huawei.com --- lib/rawdev/rte_rawdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c index 474bdc95407f..4f8897b63947 100644 --- a/lib/rawdev/rte_rawdev.c +++ b/lib/rawdev/rte_rawdev.c @@ -656,7 +656,7 @@ handle_dev_dump(const char *cmd __rte_unused, if (!rte_rawdev_pmd_is_valid_dev(dev_id)) return -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