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 DD5B24326F; Thu, 2 Nov 2023 14:09:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CC5C41140; Thu, 2 Nov 2023 14:09:06 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2068.outbound.protection.outlook.com [40.107.243.68]) by mails.dpdk.org (Postfix) with ESMTP id 3397540DDB; Thu, 2 Nov 2023 14:09:05 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QvAVMQlce+msQiJJP9W+GR6gDkPJPG+dToWj1RLBSIYS3Jo7Wsdsco/jp+vwrC7ST2aUOXbj5NTW206QpQuGlUhQ+MMN3W0w3N0ggk4fA/kXCmI1FDe7vGiIGzEK7KO6jUussTmwFPkf574dSg5g+g9Ez5G0Ihp8UPWdyHs4vONxzKIQFS5NwK0FtJipUOs9rDHYlxj2mo7g5hW8cussWk9ypjF3iOXvo+bLWzra4Vt93TXBE8N4kR+3nMPXThYYYAyoYfS/hk+vsBu2hA/3lpIpxllLjrUtk0RQrduDtEUHNCbc/jXK+qCo6YhlNALPxHyJd1L24+IlJz+y62B3aQ== 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=zUHc1/K+aNjBleu3GyLNt3IuDo1zNVILm4PZKkyiDxU=; b=Lr6JfNsxjY8dWG1tk7LJlDcyLaYgr58U3wq+vjvqkrAOeB7CSommexy4KKdU37HsHJ1eCuthcAjhKstR3p1NkRc60jxSlS7D0i4WIfXBC5VxaTi8C5+EqH2fL7BorNJv8+ysaykyEULMaGI76RRqb7aRMXSMBO7vN5QKgjZ/JqbPkdrdJmCPFCUl/wO6oUqqTCXR8dsZnxu1GoQOpu0ZJ5anuWCi7qnD3GGRn5Qi24PD9A2n2SRMjv98wUeAumEd6RxtwUP7K9pygXYlI0TVsnMnTpjolftW9AABMW4CP9WPF8KKkdL7kw0f2wS99ozmfUAZOca/QUTXcmU0Ada7kA== 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=zUHc1/K+aNjBleu3GyLNt3IuDo1zNVILm4PZKkyiDxU=; b=thwfBUP0o/7PKXMHAGFWy+OAR581TmtgCkwRm+wSfcdyXYQUOWDQJavMJ1a/8dTd15WRL88swlt+gAHAUKws73u3KXZUTVOst5f1s746vREsjKsg9pOiHJhuz/CCE7Idiq3K1zGZimuKPkf2TA547SnqVhqu8i7uMlwsQkcELfs= Received: from DM6PR02CA0051.namprd02.prod.outlook.com (2603:10b6:5:177::28) by DM4PR12MB7623.namprd12.prod.outlook.com (2603:10b6:8:108::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Thu, 2 Nov 2023 13:09:03 +0000 Received: from DS3PEPF000099D9.namprd04.prod.outlook.com (2603:10b6:5:177:cafe::f4) by DM6PR02CA0051.outlook.office365.com (2603:10b6:5:177::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.19 via Frontend Transport; Thu, 2 Nov 2023 13:09:03 +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 DS3PEPF000099D9.mail.protection.outlook.com (10.167.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6954.19 via Frontend Transport; Thu, 2 Nov 2023 13:09:02 +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.32; Thu, 2 Nov 2023 08:09:01 -0500 From: Ferruh Yigit To: Chaoyong He , Alejandro Lucero CC: , Subject: [PATCH 2/2] net/nfp: fix calloc parameters Date: Thu, 2 Nov 2023 13:08:47 +0000 Message-ID: <20231102130847.3367102-2-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231102130847.3367102-1-ferruh.yigit@amd.com> References: <20231102130847.3367102-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099D9:EE_|DM4PR12MB7623:EE_ X-MS-Office365-Filtering-Correlation-Id: 147d146b-17c4-404f-3b45-08dbdba4e302 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z7GIH016DgXeY9DrXCuI72PCIZP5JFuc1HjercGhceniEaLclcXv6Ex81uC7CfNdMzGBy+uCDr/PObwJXBaT0jcu1PnAJTyx/0j3JZwV7vK2k0EfGeURaqu5girSQrb2RFeh6frSd6vmPMJnBy40VmHqjGLRmGm6jzzwXzfvhOTTb4OiizqJILFfXv3/29GqCq1jqHoT7iabCPmJSlzf5rs9o9jgVGh2/4BpoqeatpwtsMu0hApbAcCDi+C22O9NwBB2yGUTEavCEUHIiFnnfI+tVTGR2yrYR1xJUWZiMgPcA4yQV72lbvj2ys7cpjNmZtbOpPZen+zhDBxXnB2JQtfmWqqIW1dSPLdpiDK3kf3oVx5/uSmXFrqw8OjAyhQCWM0cLAWMZ6m+ZqjwcynSrqJpOkJlyQimQoFqkHcHSpwbF5MyM915mA0UFoPHDZ+nOPwqExAeYPmYhJQywWLGegyHPTJ0a7+d990Ze9rO1w5uNS/at6goxNyr/1kcpCGo4glmjMxqCjsVIv3a8m+P5HRl2DXWZYX6ermArjaNun0qRaElO2vmvm/uFoMVJbMbjIrrWd046r+evHlW2AYA1rHhr9zy8jMgtJWND1oVXD3tAgPK6fHMdEWkvtQ6idy60VYZgsKzbOg6yHyqTiB1Hrv7Fx+hG/sZeN1Uq9VNoyVutlHBUPtLvB12r8fFctfDCGEpF611axQbs8WPQWNaMKGn9Ka6swFyvBib/N2beqpCbOWcNFYjp+0mhRJDIBbsICubwAPsCDaH8s/CkrFmk+ndLecPQjuEbLuSIvDtGMiDMW76aZ93F9+DBVI0UAA0 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)(230273577357003)(230173577357003)(82310400011)(186009)(64100799003)(451199024)(1800799009)(36840700001)(40470700004)(46966006)(70586007)(70206006)(110136005)(54906003)(316002)(478600001)(6666004)(5660300002)(86362001)(41300700001)(40460700003)(8676002)(2906002)(8936002)(36756003)(4326008)(2616005)(44832011)(336012)(426003)(83380400001)(356005)(81166007)(1076003)(82740400003)(26005)(16526019)(36860700001)(47076005)(7696005)(40480700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2023 13:09:02.9938 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 147d146b-17c4-404f-3b45-08dbdba4e302 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: DS3PEPF000099D9.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7623 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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 --- 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