]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: Use while loop and break instead of gotos
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 16 Dec 2024 17:56:21 +0000 (19:56 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 18 Feb 2025 21:40:53 +0000 (15:40 -0600)
commitacba174d2e754346c07578ad2220258706a203e2
tree2ef2ad07b5d86b49814c0cd2c81e9d4b0efc0814
parent0aa089cdde945d19ab2e51a8e60a129e9944d312
PCI: Use while loop and break instead of gotos

pci_assign_unassigned_root_bus_resources() and
pci_assign_unassigned_bridge_resources() contain ad hoc loops using
backwards goto and gotos out of the loop. Replace them with while loops
and break statements.

While reindenting the loop bodies, add braces & remove parenthesis.

Link: https://lore.kernel.org/r/20241216175632.4175-15-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Xiaochun Lee <lixc17@lenovo.com>
drivers/pci/setup-bus.c