]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: Fetch dev_res to local var in __assign_resources_sorted()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 19 Dec 2025 17:40:22 +0000 (19:40 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 Jan 2026 22:36:51 +0000 (16:36 -0600)
commite112fbb26b66b183d9387017b29e5d0b62986eed
treeadd0394ff9cb9ca5bd46ae0632ada93653e5c6e3
parent4bee4fc0f4ee1086e498f9d197352237a0232598
PCI: Fetch dev_res to local var in __assign_resources_sorted()

__assign_resources_sorted() calls get_res_add_size() and
get_res_add_align(), each walking through the realloc_head list to
relocate the corresponding pci_dev_resource entry.

Fetch the pci_dev_resource entry into a local variable to avoid double
walk.

In addition, reverse logic to reduce indentation level.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251219174036.16738-10-ilpo.jarvinen@linux.intel.com
drivers/pci/setup-bus.c