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 AB432439B8 for ; Wed, 24 Jan 2024 19:54:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E8B442E07; Wed, 24 Jan 2024 19:54:44 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2076.outbound.protection.outlook.com [40.107.212.76]) by mails.dpdk.org (Postfix) with ESMTP id 742D042E19; Wed, 24 Jan 2024 19:54:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AddnHZbwv5ySGw+4F4ZCM/4iJ458ROly+oJbfm1xEm977BVTEqjgRLg7FokxZfHss84NOa6u3/Gpat0uQG2FHUipgus+PRCoLyF15mSBcPT7K/YaR8revA488aELDznh9pGHIUZ/USrNDmcpT4Gq1OJOCOGYXg7X2j3yZN+WnIsEzRiJLTFcwWtJScibiL+tT/a60HlK1jkIBuUVXOPe4G8690uoHZ89ogKGNAYh1HsiXxrwvY+A+M0oeVNG8MTL+hYeU82vLcMqQLMsoRdHW0Beb415wSujmKY86g4ZxcHGEK0vYlmASUYGbjv0Turqpzkp449e2w3MvTEv6cRBOw== 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=IIScUqkbnGcIOTY0hkxPOw4eYFK9e3dlt2pwsxgupJg=; b=I2aq39EXAu/8YY+64LI+LZ67oUjfwW01xzcb/js4xRUaIrjxs+ixhFmWCVasEWjvO4YfFQmGZ0NQC5Tl/e3shenBagQnGHJ6DqTc15yHrHTQGRYYmdIIYdRO3zNbVZjTiXDkYajJuT6YUynm4pPT0QAOim/881dF8/ZZjma71AHnA8sn8CEAgdzB172t7YY27O13jeiVNyVackkKuzRx5GE22mq95J3tY9yQK024uG2QF/ckVqsRxGld5mM4/Opixv6GPxTz2kWTl+MDkDH07Z7JJEep2NlXrjPNrIFrhYok64lFDssrdBILAiwYhSZQbXnpYlXr3MzDXZ+UrASjBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=oktetlabs.ru 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=IIScUqkbnGcIOTY0hkxPOw4eYFK9e3dlt2pwsxgupJg=; b=DGXFA1Oat3KFiI8QxDNca5NVNz/UpDCLJ2XA4tmDhG0AByOrymY2tptV9+P3sfS1rUQbJPSqb7uP06rXih6b3mn1r1Z3zCqbwhxQ2125DyQLuRuzHGFJiPJzh3Npd2YvfOWMqYiP8B0vxG+YRPdn/6q+NGa4c3DzMSNlXmg1RvA= Received: from BYAPR01CA0021.prod.exchangelabs.com (2603:10b6:a02:80::34) by CH0PR12MB5281.namprd12.prod.outlook.com (2603:10b6:610:d4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.24; Wed, 24 Jan 2024 18:54:37 +0000 Received: from SJ1PEPF00001CE9.namprd03.prod.outlook.com (2603:10b6:a02:80:cafe::ff) 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:37 +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:35 +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:30 -0600 From: Ferruh Yigit To: Andrew Rybchenko , Andy Moreton , Ivan Malov CC: , Subject: [PATCH v2 8/8] net/sfc: fix calloc parameters Date: Wed, 24 Jan 2024 18:54:05 +0000 Message-ID: <20240124185406.3598985-8-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_|CH0PR12MB5281:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b591bdd-5d80-4de6-9473-08dc1d0de8b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A8D4QwXu+oARYvcOQ1iu0TwVgviY7xX1sO0FAXuzFP9syAmgPFouzvtf1kI8/rcip1mhG92OS+Sg5Lwm6LKSAA7h0T+0BgpPbpjb5WMApB/xoAWxhD24zXqaiZvvfe2OERKIQzxfwiHj/uXMLa23tzTOBTFd2esNopUDd1Cg9Eom6PuH4jzQbv/jcRVKr8ymThyiDj3B7Ba8dIOyQtr1mGl5inXoln6fWXejSk1FuuL1whCvxG8o7V2dstNoPAUjUFeBTiBPU91tdzO+omyCNBzWDe74PEZ9BgQx6RwEl+Ekh76oEocoJ3Fb9WP+lDPz3sqycQ8aAjgPUxa3JkNPKnMGIBwHc6yxN3A3XMOBU02BDpy9Nraql4OVTexjzf+8tfu+6XxsAbIDKBmGfS7YCp2m8UyKnNHWxfj8Orh8OGxD+EEHPvKIajlMTSZdDTX8tf78nH5cPW3xmQB0nKG+YfpTq2gye96KmW8bhYbYgrT65XhnF0K8KyisiazYGJIKgcbuk7L6Rz4HRfom3xRaoAeU8FgVX2ubI4dUzrRGtTV1mc3SV3opN22hCsxY8vAkcFLHkhGJJO2E+uqjwdU5wzotsUxteAEBudWi/N5n4xDiPu590/JUHyYB263+gmuTQRjTSq0MSL5xhEI89ejU+UZaGxsCIahC76P+ba/T/IxP8gzUvbx4bMTkzgpdDuB+EZ4UhaDeMPE9cY1uaWYidn8zUawGcc7/PDIGyRRtotYOH+AEeX5vYhjBXeACXwh9CNGrATXQHRnmtx19E4bNPqQZ3DzcOBpBm4Pa7ptEE0q9Andy6muwkLGsyXRPx3Zd 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)(39860400002)(136003)(376002)(346002)(230173577357003)(230922051799003)(230273577357003)(64100799003)(82310400011)(186009)(1800799012)(451199024)(40470700004)(36840700001)(46966006)(26005)(81166007)(356005)(82740400003)(478600001)(41300700001)(86362001)(7696005)(36756003)(8936002)(426003)(6666004)(16526019)(2616005)(4326008)(8676002)(336012)(110136005)(316002)(5660300002)(1076003)(70206006)(70586007)(54906003)(36860700001)(2906002)(44832011)(83380400001)(47076005)(40460700003)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 18:54:35.4184 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7b591bdd-5d80-4de6-9473-08dc1d0de8b0 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: CH0PR12MB5281 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 rte_calloc usage, because rte_calloc parameter order is wrong, fixing it by replacing parameters. [1] gcc (GCC) 14.0.1 20240124 (experimental) [2] Compiling C object drivers/libtmp_rte_net_sfc.a.p/net_sfc_sfc_mae.c.o ../net/sfc/sfc_mae.c: In function ‘sfc_mae_action_set_list_add’: ../drivers/net/sfc/sfc_mae.c:1353:35: warning: ‘rte_calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 1353 | sizeof(struct sfc_mae_action_set *), | ^~~~~~ Fixes: 002f591f54c3 ("net/sfc: support packet replay in transfer flows") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: ivan.malov@arknetworks.am --- drivers/net/sfc/sfc_mae.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index e5ec0ae49d4d..60ff6d21810a 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -1350,8 +1350,8 @@ sfc_mae_action_set_list_add(struct sfc_adapter *sa, action_set_list->action_sets = rte_calloc("sfc_mae_action_set_list_action_sets", - sizeof(struct sfc_mae_action_set *), - action_set_list->nb_action_sets, 0); + action_set_list->nb_action_sets, + sizeof(struct sfc_mae_action_set *), 0); if (action_set_list->action_sets == NULL) { sfc_err(sa, "failed to allocate action set list"); rte_free(action_set_list); -- 2.34.1