Thread (35 messages) 35 messages, 5 authors, 2025-11-13

Lifecycle

  1. Posted Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

[PATCH 24/24] PCI: Alter misleading recursion to pci_bus_release_bridge_resources()

From: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Date: 2025-08-22 15:00:01
Also in: linux-m68k, linux-mips, linux-pci, lkml, sparclinux
Subsystem: pci subsystem, the rest · Maintainers: Bjorn Helgaas, Linus Torvalds

Recursing into pci_bus_release_bridge_resources() should not alter
rel_type because it makes no sense to change the release type within
the recursion call chain. A literal "whole_subtree" is passed into the
recursion instead of "rel_type" parameter which is misleading as the
release type should remain the same throughout the entire operation.

This is not a correctness issue because of the preceding if () that
only allows the recursion to happen if rel_type is "whole_subtree".
Still, replace the non-intuitive parameter with direct passing of
"rel_type".

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/pci/setup-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 9c69a84f2b23..0fbdb031bc3d 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1855,7 +1855,7 @@ static void pci_bus_release_bridge_resources(struct pci_bus *bus,
 			if (res->parent != b_win)
 				continue;
 
-			pci_bus_release_bridge_resources(b, res, whole_subtree);
+			pci_bus_release_bridge_resources(b, res, rel_type);
 		}
 	}
 
-- 
2.39.5

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help