patch 'net/igc/base: fix NVM data type in bit shift' has been queued to stable release 23.11.4

Xueming Li xuemingl at nvidia.com
Tue Feb 18 13:34:52 CET 2025


Hi,

FYI, your patch has been queued to stable release 23.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
Please shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=fed480fbadeab2f9284a22535016d365f9530994

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From fed480fbadeab2f9284a22535016d365f9530994 Mon Sep 17 00:00:00 2001
From: Przemyslaw Ciesielski <przemyslaw.ciesielski at intel.com>
Date: Thu, 6 Feb 2025 16:08:36 +0000
Subject: [PATCH] net/igc/base: fix NVM data type in bit shift
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d6ad4cdad361558bfb2c04112bd6650debbc9c7f ]

There is a static analysis warning due to wrong data types being used
for NVM read data shifts. Fix it via explicit type cast.

Fixes: 8cb7c57d9b3c ("net/igc: support device initialization")

Signed-off-by: Przemyslaw Ciesielski <przemyslaw.ciesielski at intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/igc/base/igc_nvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/igc/base/igc_nvm.c b/drivers/net/igc/base/igc_nvm.c
index a7c901ab56..d37a3ffb0e 100644
--- a/drivers/net/igc/base/igc_nvm.c
+++ b/drivers/net/igc/base/igc_nvm.c
@@ -926,14 +926,14 @@ s32 igc_read_pba_num_generic(struct igc_hw *hw, u32 *pba_num)
 		DEBUGOUT("NVM Not Supported\n");
 		return -IGC_NOT_IMPLEMENTED;
 	}
-	*pba_num = (u32)(nvm_data << 16);
+	*pba_num = ((u32)nvm_data << 16);

 	ret_val = hw->nvm.ops.read(hw, NVM_PBA_OFFSET_1, 1, &nvm_data);
 	if (ret_val) {
 		DEBUGOUT("NVM Read Error\n");
 		return ret_val;
 	}
-	*pba_num |= nvm_data;
+	*pba_num |= (u32)nvm_data;

 	return IGC_SUCCESS;
 }
--
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-18 19:39:02.740686284 +0800
+++ 0057-net-igc-base-fix-NVM-data-type-in-bit-shift.patch	2025-02-18 19:39:00.648244044 +0800
@@ -1 +1 @@
-From d6ad4cdad361558bfb2c04112bd6650debbc9c7f Mon Sep 17 00:00:00 2001
+From fed480fbadeab2f9284a22535016d365f9530994 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d6ad4cdad361558bfb2c04112bd6650debbc9c7f ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -16 +18 @@
- drivers/net/intel/igc/base/igc_nvm.c | 4 ++--
+ drivers/net/igc/base/igc_nvm.c | 4 ++--
@@ -19 +21 @@
-diff --git a/drivers/net/intel/igc/base/igc_nvm.c b/drivers/net/intel/igc/base/igc_nvm.c
+diff --git a/drivers/net/igc/base/igc_nvm.c b/drivers/net/igc/base/igc_nvm.c
@@ -21,2 +23,2 @@
---- a/drivers/net/intel/igc/base/igc_nvm.c
-+++ b/drivers/net/intel/igc/base/igc_nvm.c
+--- a/drivers/net/igc/base/igc_nvm.c
++++ b/drivers/net/igc/base/igc_nvm.c


More information about the stable mailing list