[PATCH 1/5] alpha/pci: Use official API to iterate over PCI buses

From: Gerd Bayer

Date: Fri May 15 2026 - 10:26:39 EST


Replace iterating over pci_root_buses with the official
pci_find_next_bus() call provided by PCI core. This allows to make
pci_root_buses private to PCI core.

Signed-off-by: Gerd Bayer <gbayer@xxxxxxxxxxxxx>
---
arch/alpha/kernel/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 11df411b1d18..02ec4dbb3ac6 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -312,9 +312,9 @@ pcibios_claim_one_bus(struct pci_bus *b)
static void __init
pcibios_claim_console_setup(void)
{
- struct pci_bus *b;
+ struct pci_bus *b = NULL;

- list_for_each_entry(b, &pci_root_buses, node)
+ while ((b = pci_find_next_bus(b)) != NULL)
pcibios_claim_one_bus(b);
}


--
2.54.0