PCI: Make pci_bus_for_each_resource() index optional
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 4 Apr 2023 15:45:25 +0000 (10:45 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 5 Apr 2023 20:10:09 +0000 (15:10 -0500)
commit02992064bdffc97403b6058491094cd41d1a11ef
tree6aa20b8e594b33ee6627b973c0b44ac290591d68
parentceb928be5cab32043f230bcb1adeb0a9a9b8f0f2
PCI: Make pci_bus_for_each_resource() index optional

Refactor pci_bus_for_each_resource() in the same way as
pci_dev_for_each_resource(). This allows the index to be hidden inside the
implementation so the caller can omit it when it's not used otherwise.

No functional changes intended.

Link: https://lore.kernel.org/r/20230330162434.35055-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
drivers/pci/bus.c
drivers/pci/hotplug/shpchp_sysfs.c
drivers/pci/pci.c
drivers/pci/probe.c
drivers/pci/setup-bus.c
include/linux/pci.h