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 9E631439B8 for ; Wed, 24 Jan 2024 19:54:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4012E42DF2; Wed, 24 Jan 2024 19:54:35 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2064.outbound.protection.outlook.com [40.107.243.64]) by mails.dpdk.org (Postfix) with ESMTP id 47D7B42DE2; Wed, 24 Jan 2024 19:54:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Syj5ySg+ytVVBwfvaN7RVkRX0vHUEv1C3iOj5EfoF9q4hPQ9GX36azFoHO3v921JeNkrvWdDL2VCRPPsomFzRE1hmuVSWoNphKp11V0qlCyjmrhJVXBViMzkuVCL4EOWradjqRecTaf622S1vXwUw2YY+Zt6BBA2sEizrjVyvy72fRmblCWyTKo9aHZ9Ht1aiPCakcwWmONRF76g25Vdb3OsdZ2tyDsNHROXe7LLSaLuE0DCerHBtUeG6zbbkKqzO47dWV80N5xSGxqNSEcggoQRy3GzhVssKN+MybHxtwK2XqZWBphMW+8rgHqG1btvIXDzSatMVAlwCfF9LCvhDw== 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=rRUfsuaf7RxC1o1Q9b9gClLEDwHYjXTl2wYg2w8lSTA=; b=VfxgVZSvOwxcL0zMVTdw0utD56D77oejlpJpTZpSzd3Sv1J19DE5t/zjuyc2nFA7aJnysiGnoN6YzEKowQ696mDBcNY+FTskAAt1ufhWj9w7Q9zxPg5u+V4xAys65oRNiNUxbRe/Vnj07Kvr8dNqPFQOZBeCd42njf8u/h1egTUqBzmIZ0JtQA9SM9iBbzS9SOQlR4BSyl6aoOrEIPzJrKTME0MSPudLe8Ud+EjTGTEr6L0KYHLRmk/VbueRj5rjRKd4InFU5rrfyogLcIK05EI04FmewzavmTP8XVW3sSZ//7KQSE8+fkWfyuFnrbreVYaAlHIer0oZyWczBJJrKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=corigine.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=rRUfsuaf7RxC1o1Q9b9gClLEDwHYjXTl2wYg2w8lSTA=; b=WQ0tm8rRIjMlOQ9ybOI9mRBhlo0GpI0uYgfAtGbF3VHrPbA+B2PBxBB1+Z9nke9povxv5fDvsVieH9DfY49UPMR9tI3GXUtLsyXIma/A81YUmNaWoFoskLWb7Ih2UbInc7hbQuM7feWjkr4BkR6REjUta2oxYrNLzSQmzq6Ka6k= Received: from BYAPR01CA0007.prod.exchangelabs.com (2603:10b6:a02:80::20) by MW4PR12MB6827.namprd12.prod.outlook.com (2603:10b6:303:20b::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:27 +0000 Received: from SJ1PEPF00001CE9.namprd03.prod.outlook.com (2603:10b6:a02:80:cafe::3a) by BYAPR01CA0007.outlook.office365.com (2603:10b6:a02:80::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.38 via Frontend Transport; Wed, 24 Jan 2024 18:54:27 +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:27 +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:25 -0600 From: Ferruh Yigit To: Chaoyong He , Alejandro Lucero CC: , Subject: [PATCH v2 2/8] net/nfp: fix calloc parameters Date: Wed, 24 Jan 2024 18:53:59 +0000 Message-ID: <20240124185406.3598985-2-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_|MW4PR12MB6827:EE_ X-MS-Office365-Filtering-Correlation-Id: 05aefc40-015b-4ffe-7cda-08dc1d0de3e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V9po8EGIHoqK9eFdWXRyHoqWNvtQl0xBLej+ygTtB1tVwlvLABLXKSfOv6jaNGS8V0CYPBJUe6TbDpZQqJsFxBV9LCT6usmKr36BRUMEK261Y97dpi4IphOeIRokWIlX3KFfni6/RMt5sTmR51sqS1E+ko333Nd9dEhsUnbl9MFK3xqTOoIhJJl4hbJ3KgbP7bSUwSdAVmSoD2M3n5LZc49qKXUDj4Mr5RpECUVgDH7p0bYFKpICmRxEeJ3vaPkPFmI9bapb3AKHUrXra+XdvftH6vsZti/kv8gQs5gAUqtIRuN3zT+plCmC9QvIvL9CA7bi6gOXMHis77xTPR7gJMv+vkeVUR2zlwlrC3w18XaluZGVEVoyYmf0fIzKPz2oF8EwhXu0PjNXQq6d2rg7GbimULCIfDiKgXXgxMBnFtChxcDE8QCJA4eGbP0mWumx/5ZTAH85cBlAQtr9AakjW9lr7lte7jXWhv0aEPHkutwSgs8oKbvHL5vhJi0vZe5jmroqL2VqHSe4XPN0S6OgGOvv3ES6KRt8CfJZeDFPPEw51bwNoE19yr4XgEI4SSNWyhUYseVG4t6ra9uudlj+ov9mH5aZUonWPlXb0NhLgJJjxwoPwT5E7X1urPCHZ2NdRLUlv8Af8iypQAh648IWGgFDqYc+/VSueBq9mdGpt1QrUlq0kDLHc+/TCM8UHSluounrEv5bR2WEOFmnRbf2uv6WJ5L/SoNDBWSjPcTRBiHOg7tLnCPu+GyQNRT+bOzyvVbEdezwxb7AGTJVEF0khElrg5UYQqVV+VeWKF/hrRJVDOqf/mdUERdqMpK+YuAV 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)(136003)(396003)(39860400002)(346002)(230273577357003)(230173577357003)(230922051799003)(451199024)(64100799003)(1800799012)(82310400011)(186009)(40470700004)(46966006)(36840700001)(36860700001)(41300700001)(47076005)(86362001)(36756003)(82740400003)(81166007)(356005)(4326008)(478600001)(44832011)(54906003)(316002)(70206006)(70586007)(1076003)(8676002)(110136005)(2616005)(8936002)(83380400001)(26005)(2906002)(16526019)(336012)(426003)(6666004)(7696005)(5660300002)(40460700003)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 18:54:27.3871 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05aefc40-015b-4ffe-7cda-08dc1d0de3e9 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: MW4PR12MB6827 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 20231102 (experimental) [2] Compiling C object .../net_nfp_nfpcore_nfp_mutex.c.o .../net/nfp/nfpcore/nfp_mutex.c: In function ‘nfp_cpp_mutex_alloc’: ../drivers/net/nfp/nfpcore/nfp_mutex.c:171:15: warning: allocation of insufficient size ‘1’ for type ‘struct nfp_cpp_mutex’ with size ‘48’ [-Walloc-size] 171 | mutex = calloc(sizeof(*mutex), 1); | ^ Fixes: c7e9729da6b5 ("net/nfp: support CPP") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Acked-by: Chaoyong He --- Cc: alejandro.lucero@netronome.com --- drivers/net/nfp/nfpcore/nfp_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfpcore/nfp_mutex.c b/drivers/net/nfp/nfpcore/nfp_mutex.c index 3c10c7a090c0..edb78dfdc917 100644 --- a/drivers/net/nfp/nfpcore/nfp_mutex.c +++ b/drivers/net/nfp/nfpcore/nfp_mutex.c @@ -168,7 +168,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, if (tmp != key) return NULL; - mutex = calloc(sizeof(*mutex), 1); + mutex = calloc(1, sizeof(*mutex)); if (mutex == NULL) return NULL; -- 2.34.1