diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-04-04 17:45:25 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-04-05 22:10:09 +0200 |
commit | 02992064bdffc97403b6058491094cd41d1a11ef (patch) | |
tree | 6aa20b8e594b33ee6627b973c0b44ac290591d68 /drivers/pci/probe.c | |
parent | PCI: Document pci_bus_for_each_resource() (diff) | |
download | linux-02992064bdffc97403b6058491094cd41d1a11ef.tar.xz linux-02992064bdffc97403b6058491094cd41d1a11ef.zip |
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>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index a3f68b6ba6ac..f8191750f6b7 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -533,7 +533,7 @@ void pci_read_bridge_bases(struct pci_bus *child) pci_read_bridge_mmio_pref(child); if (dev->transparent) { - pci_bus_for_each_resource(child->parent, res, i) { + pci_bus_for_each_resource(child->parent, res) { if (res && res->flags) { pci_bus_add_resource(child, res, PCI_SUBTRACTIVE_DECODE); |