patch 'bus/pci: fix variable shadowing' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 20 15:55:16 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/22/26. So 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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9f5308d349a9762e5bb4fcd0510f6683c2c04beb

Thanks.

Luca Boccassi

---
>From 9f5308d349a9762e5bb4fcd0510f6683c2c04beb Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 14 Jan 2026 15:44:25 +0000
Subject: [PATCH] bus/pci: fix variable shadowing

[ upstream commit d061b3a53355b5976de45092fc853f0f46d8199e ]

Remove two instances where we had duplicate shadowed local variables
called "ret". In each case, we could just remove the inner instance,
since the outer value was not needing to be preserved.

Fixes: c0ce0577e84d ("pci: consolidate address comparisons")
Fixes: 03ba15ca65c1 ("vfio: allow mapping MSI-X BARs if kernel allows it")
Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/bus/pci/linux/pci.c      | 1 -
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 drivers/bus/pci/windows/pci.c    | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 9056035b33..d20c0d90c3 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -327,7 +327,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 		rte_pci_add_device(dev);
 	} else {
 		struct rte_pci_device *dev2;
-		int ret;
 
 		TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
 			ret = rte_pci_addr_cmp(&dev->addr, &dev2->addr);
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index eb579d21bf..129eefb9a5 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -810,7 +810,7 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
 	}
 	/* if we found our MSI-X BAR region, check if we can mmap it */
 	if (vfio_res->msix_table.bar_index != -1) {
-		int ret = pci_vfio_msix_is_mappable(vfio_dev_fd,
+		ret = pci_vfio_msix_is_mappable(vfio_dev_fd,
 				vfio_res->msix_table.bar_index);
 		if (ret < 0) {
 			PCI_LOG(ERR, "Couldn't check if MSI-X BAR is mappable");
diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index ca89a7fa50..0c63ac01f0 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -422,7 +422,6 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data)
 		rte_pci_add_device(dev);
 	} else {
 		struct rte_pci_device *dev2 = NULL;
-		int ret;
 
 		TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) {
 			ret = rte_pci_addr_cmp(&dev->addr, &dev2->addr);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-20 14:55:43.904597626 +0000
+++ 0014-bus-pci-fix-variable-shadowing.patch	2026-02-20 14:55:43.176190600 +0000
@@ -1 +1 @@
-From d061b3a53355b5976de45092fc853f0f46d8199e Mon Sep 17 00:00:00 2001
+From 9f5308d349a9762e5bb4fcd0510f6683c2c04beb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d061b3a53355b5976de45092fc853f0f46d8199e ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 66d7e09a6e..2ffac82e94 100644
+index 9056035b33..d20c0d90c3 100644
@@ -28 +29 @@
-@@ -326,7 +326,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
+@@ -327,7 +327,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
@@ -37 +38 @@
-index 8562fdcc6b..242f567ed7 100644
+index eb579d21bf..129eefb9a5 100644
@@ -40 +41 @@
-@@ -797,7 +797,7 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
+@@ -810,7 +810,7 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
@@ -50 +51 @@
-index 6f6f368cb7..a5ce3b51f7 100644
+index ca89a7fa50..0c63ac01f0 100644
@@ -53 +54 @@
-@@ -433,7 +433,6 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data)
+@@ -422,7 +422,6 @@ pci_scan_one(HDEVINFO dev_info, PSP_DEVINFO_DATA device_info_data)


More information about the stable mailing list