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 21E37439B9 for ; Wed, 24 Jan 2024 19:54:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91F9A42E1A; Wed, 24 Jan 2024 19:54:41 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2088.outbound.protection.outlook.com [40.107.92.88]) by mails.dpdk.org (Postfix) with ESMTP id DD69242E14; Wed, 24 Jan 2024 19:54:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J4yYcc5nANqRq5YFZGL9trXzhcJZPUSa1p5SrwzEEs6ecFB7XAZ6HEVr+Ye8wBNp+wIvnURY1CJHw+zyrZC2gzSj3z66LVDBKx8Jjx4n71dImPwnjH2HYJAWdyUjUk5IFRaCkMiYZ17DgxIc/9lnBrobWMOBRf3t/QAVxrTOvMQ6DWoAUK4XLxqDD9kJdZacvm3XL78T+xWIjuXv0TEYOxY4ot1ck7RyYrenpMf/sOgGvOjMQvFz1Y1ZoJ4iCiy3rm99j3p1oMy148wb6OjO21+k5UTpmv9NBnhpK0R/0O0+ontIEBTSav+/N+4KKoTy8FvqCoBewFw9HHlA24gGvw== 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=oqHKkImhplFXkLlBKnf3a2qy5GdOqm7InB6DPifdrww=; b=RO3mpnlgZrhlC2vu9H7Ablu02/HICRZIkNYqnMxibEqEvA2Kh101yaQOhTgNJNz+Nnf8qCbTzo9V1/OroXyiW+bEaSKaJaNFAp7jC4WCwG4gQTDI7VK7KvVleWEQboDThR6oL6O1Jmok1xaF3n1Bbkd21qx1glPLrY+REWaaw3vyvQeX07nxlJhLX7gbVyILkW3QInPoTtrNJxziLv6D4RVjaS+/1jLQVc0j0NkuAQ6Jz34A7yULgBV/u75bCCk2fnjdjEw6X2Wl+/LqfWPgy3rNbtLKRb3UWKU+GtQ5R9n70Oz3txeIl4ztSXi90gPrl/S9CnxPSzBue/lBSKVBsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=jaube.fr 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=oqHKkImhplFXkLlBKnf3a2qy5GdOqm7InB6DPifdrww=; b=Tcbf/59ANg+4tSEnkpFq5oRUk650wdLWGlh46thaWhOH82eTF2C2q5dusyoxZimQVxVQ6BAHNC+BK2AZDuPDCwprKSQa5djMei1ZsOoKJZ8iSmls+qrRepy4B8kpVk/L2Q7AZG0/afqbG3r6x1hc8mx1cw8tohh+6n53TcbdSVI= Received: from BYAPR01CA0011.prod.exchangelabs.com (2603:10b6:a02:80::24) by PH7PR12MB7890.namprd12.prod.outlook.com (2603:10b6:510:268::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:35 +0000 Received: from SJ1PEPF00001CE9.namprd03.prod.outlook.com (2603:10b6:a02:80:cafe::1d) by BYAPR01CA0011.outlook.office365.com (2603:10b6:a02:80::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.24 via Frontend Transport; Wed, 24 Jan 2024 18:54:35 +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:34 +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: Julien Aube , Harish Patil , Stephen Hemminger CC: , Subject: [PATCH v2 7/8] net/bnx2x: fix calloc parameters Date: Wed, 24 Jan 2024 18:54:04 +0000 Message-ID: <20240124185406.3598985-7-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_|PH7PR12MB7890:EE_ X-MS-Office365-Filtering-Correlation-Id: ba4015e5-cf14-4ef7-8710-08dc1d0de821 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: spp/0wik3mt2L98k9BObvwnyvqGicd4Z1U64NURJkbEqQmQVuEHNbltnA/kzudtPnQpT9z/pMJsMNKf+ZHdFHzyAs6oSTwHfGGMYcLu7XTtC0oD6ROp0SwPSKz2pzneo1rd7SKQb8n82GFzclYfxEc0vTuUzlsFFgJgnFF57ypAs0wCvxE6h+8AJN9DeLhjnK+YOD8bc5Z5fzCs3oM2musAm2GABq4OWRk43azYLJTjUyhLdjrZBAu+kv/MKZ15P3XvBQKT8dnC4ExgNL+jw0k8kiG6kChPQMNGSpF0us1zqWuPuUGK5XOFzdal62EtLJBKIzGraVwk4SThfzKusKufQyYKykoOsfmZITEZNXQiPC4MxyXVS8UkMxsbAjahoko1he7/XsezUd4P47NkZ45VDXMP3ixZ+Y6qiUSX9Y4EwCboNXAfk4d5rh7wcKCao9ScdwtnEpIfFpyH/aOebfJMRZuK+jUnSrD7mRNO41BY8M2mrvtxNEABHTnJwuAGGRTu5qEGW2N/9BKU2sCGRo4PaltGhEeMSXaM9Bsd0NFBHbVWGjMA8tASJmZvtjvQ32SVg7Y/iO7Il0czdx/EEq65CE5EOjWfBDW59tcp6RRR+2FyX0O+YEtBTU2fpsogFYBm27WkSk7yvmXiBuZzCZQQGwPFcuEANC91HZzAbXD9PGM2lHfBDU7rJU/5OAXoTpr5aQKQOwAel9PldFeel7VeC9TELZoHkWDKiWxH2OB9S96SZkSn38+GaSM7B6LLTdUF0vW+jXlqrw/jqAaUXLD2S9UZoGe2DOUcnkDtw7HsMZnuZ1jJZQACnmlXtJ/kT 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)(346002)(396003)(136003)(39860400002)(230273577357003)(230173577357003)(230922051799003)(1800799012)(451199024)(64100799003)(82310400011)(186009)(40470700004)(36840700001)(46966006)(81166007)(1076003)(2616005)(7696005)(70206006)(40460700003)(54906003)(70586007)(316002)(356005)(40480700001)(110136005)(83380400001)(47076005)(4326008)(8936002)(8676002)(44832011)(26005)(16526019)(336012)(6666004)(36860700001)(478600001)(5660300002)(82740400003)(426003)(2906002)(41300700001)(86362001)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 18:54:34.4340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ba4015e5-cf14-4ef7-8710-08dc1d0de821 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: PH7PR12MB7890 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_bnx2x.a.p/net_bnx2x_bnx2x.c.o ../drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_alloc_ilt_lines_mem’: ../drivers/net/bnx2x/bnx2x.c:2392:44: warning: ‘rte_calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 2392 | sizeof(struct ilt_line), ILT_MAX_LINES, | ^~~~~~ Fixes: 540a211084a7 ("bnx2x: driver core") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- Cc: stephen@networkplumber.org --- drivers/net/bnx2x/bnx2x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index c3283c94f38f..597ee4335977 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -2389,7 +2389,7 @@ int bnx2x_alloc_ilt_mem(struct bnx2x_softc *sc) static int bnx2x_alloc_ilt_lines_mem(struct bnx2x_softc *sc) { sc->ilt->lines = rte_calloc("", - sizeof(struct ilt_line), ILT_MAX_LINES, + ILT_MAX_LINES, sizeof(struct ilt_line), RTE_CACHE_LINE_SIZE); return sc->ilt->lines == NULL; } -- 2.34.1