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 8A58345DA0 for ; Mon, 25 Nov 2024 08:04:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7455340674; Mon, 25 Nov 2024 08:04:57 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id 6DE1840677; Mon, 25 Nov 2024 08:04:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732518296; x=1764054296; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ajcX+9kjz2P8t3Y6JajZgLFRZyqwfu2NVEaztlOO46M=; b=YZAOOdzB8cke9RJiUg9qXiK6g8U2cxj/SMHwzKKy9QZg3C69NvnveWgk kD81OW6ydzOKwJYRPrfrEHfdyqGGf9Vi6WzkC04cGyGlskwbd2+0eSrQS zAJpBafqQpNMjHFMDDVupARikywWXlI7s/bNFIrHkJ4oMSJ+kONzqioyR NujLN77hSiTqoxxmsE23gYTAXcN+HJbVp4o5bNSGVaRvWStkleKU1SL4A aPwE8YEAm5Rdjiz7sCJcEPmQatXaF8zRBlrcEzbl4twFON+pQrZ6JATpZ dl69ga1vYvyzAGh7/IWp/0fFKH0DaPuEdiVGjKawg0KQrHNp6G04oVWzZ Q==; X-CSE-ConnectionGUID: upub3fkBRGmEmNpW0znbHQ== X-CSE-MsgGUID: fy4w9L/iTNG44Gwdn0WdLA== X-IronPort-AV: E=McAfee;i="6700,10204,11266"; a="20198358" X-IronPort-AV: E=Sophos;i="6.12,182,1728975600"; d="scan'208";a="20198358" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2024 23:04:54 -0800 X-CSE-ConnectionGUID: ALQlBpu+SX2XZ0L6zh7LOQ== X-CSE-MsgGUID: jQ56S5jbQWCH4+VnLA/G2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,182,1728975600"; d="scan'208";a="91357081" Received: from unknown (HELO localhost.localdomain) ([10.239.252.55]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2024 23:04:50 -0800 From: Wenwu Ma To: ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, amitprakashs@marvell.com, abhinandan.gujjar@intel.com, dev@dpdk.org, stable@dpdk.org Cc: tingtingx.liao@intel.com, Wenwu Ma Subject: [PATCH 1/3] net/bnxt: fix uninitialized variable Date: Mon, 25 Nov 2024 14:47:53 +0800 Message-Id: <20241125064755.3943-2-wenwux.ma@intel.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20241125064755.3943-1-wenwux.ma@intel.com> References: <20241125064755.3943-1-wenwux.ma@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This patch fixes the variable 'total_pages' may be used uninitialized. Fixes: 80317ff6adfd ("net/bnxt/tf_core: support Thor2") Cc: stable@dpdk.org Signed-off-by: Wenwu Ma --- drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c index 1770069295..3aed78dbeb 100644 --- a/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c +++ b/drivers/net/bnxt/tf_core/v3/tfc_tbl_scope.c @@ -439,7 +439,7 @@ static int alloc_link_pbl(struct tfc_ts_mem_cfg *mem_cfg, uint32_t page_size, char mz_name[RTE_MEMZONE_NAMESIZE]; int mz_size; uint64_t total_size; - uint32_t total_pages; + uint32_t total_pages = 0; /* tf_em_size_page_tbl_lvl */ rc = num_pages_get(mem_cfg, page_size); -- 2.34.1