]> git.ipfire.org Git - thirdparty/linux.git/commit - .clang-format
PCI: Introduce pci_dev_for_each_resource()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 30 Mar 2023 16:24:30 +0000 (19:24 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 4 Apr 2023 15:43:52 +0000 (10:43 -0500)
commit09cc900632400079619e9154604fd299c2cc9a5a
tree9abeb2ee2000fd6b91b4de0b7f401a4e23ee8fca
parent144d204df78e40e6250201e71ef7d0e42d2a13fc
PCI: Introduce pci_dev_for_each_resource()

Instead of open-coding it everywhere introduce a tiny helper that can be
used to iterate over each resource of a PCI device, and convert the most
obvious users into it.

While at it drop doubled empty line before pdev_sort_resources().

No functional changes intended.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230330162434.35055-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mika Westerberg <mika.westerberg@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>
23 files changed:
.clang-format
arch/alpha/kernel/pci.c
arch/arm/kernel/bios32.c
arch/arm/mach-dove/pcie.c
arch/arm/mach-mv78xx0/pcie.c
arch/arm/mach-orion5x/pci.c
arch/mips/pci/ops-bcm63xx.c
arch/mips/pci/pci-legacy.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/platforms/4xx/pci.c
arch/powerpc/platforms/52xx/mpc52xx_pci.c
arch/powerpc/platforms/pseries/pci.c
arch/sh/drivers/pci/pcie-sh7786.c
arch/sparc/kernel/leon_pci.c
arch/sparc/kernel/pci.c
arch/sparc/kernel/pcic.c
drivers/pci/remove.c
drivers/pci/setup-bus.c
drivers/pci/setup-res.c
drivers/pci/vgaarb.c
drivers/pci/xen-pcifront.c
drivers/pnp/quirks.c
include/linux/pci.h