linux/drivers/pci/controller/dwc
Denis Efremov c9c13ba428 PCI: Add PCI_STD_NUM_BARS for the number of standard BARs
Code that iterates over all standard PCI BARs typically uses
PCI_STD_RESOURCE_END.  However, that requires the unusual test
"i <= PCI_STD_RESOURCE_END" rather than something the typical
"i < PCI_STD_NUM_BARS".

Add a definition for PCI_STD_NUM_BARS and change loops to use the more
idiomatic C style to help avoid fencepost errors.

Link: https://lore.kernel.org/r/20190927234026.23342-1-efremov@linux.com
Link: https://lore.kernel.org/r/20190927234308.23935-1-efremov@linux.com
Link: https://lore.kernel.org/r/20190916204158.6889-3-efremov@linux.com
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Sebastian Ott <sebott@linux.ibm.com>			# arch/s390/
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>	# video/fbdev/
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>	# pci/controller/dwc/
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>		# scsi/pm8001/
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>	# scsi/pm8001/
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>			# memstick/
2019-10-14 10:22:26 -05:00
..
Kconfig Merge branch 'lorenzo/pci/tegra' 2019-09-23 16:10:28 -05:00
Makefile Merge branch 'lorenzo/pci/tegra' 2019-09-23 16:10:28 -05:00
pci-dra7xx.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
pci-exynos.c PCI: exynos: Propagate errors for optional PHYs 2019-09-04 15:39:41 +01:00
pci-imx6.c Merge branch 'remotes/lorenzo/pci/misc' 2019-09-23 16:10:26 -05:00
pci-keystone.c PCI: keystone: Add support for PCIe EP in AM654x Platforms 2019-05-01 15:50:13 +01:00
pci-layerscape-ep.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
pci-layerscape.c PCI: dwc: layerscape: Fix a leaked reference by adding missing of_node_put() 2019-04-01 10:39:17 +01:00
pci-meson.c
pcie-al.c PCI: dwc: al: Add Amazon Annapurna Labs PCIe controller driver 2019-09-16 14:16:44 +01:00
pcie-armada8k.c PCI: armada8x: Propagate errors for optional PHYs 2019-09-04 15:42:38 +01:00
pcie-artpec6.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
pcie-designware-ep.c Merge branch 'lorenzo/pci/tegra' 2019-09-23 16:10:28 -05:00
pcie-designware-host.c Merge branch 'lorenzo/pci/tegra' 2019-09-23 16:10:28 -05:00
pcie-designware-plat.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
pcie-designware.c Merge branch 'lorenzo/pci/tegra' 2019-09-23 16:10:28 -05:00
pcie-designware.h PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
pcie-hisi.c
pcie-histb.c PCI: histb: Propagate errors for optional regulators 2019-09-04 15:43:09 +01:00
pcie-kirin.c PCI: kirin: Make structure kirin_dw_pcie_ops constant 2019-08-21 11:45:14 +01:00
pcie-qcom.c PCI: qcom: Ensure that PERST is asserted for at least 100 ms 2019-05-30 16:51:12 +01:00
pcie-spear13xx.c
pcie-tegra194.c PCI: tegra: Add support to enable slot regulators 2019-09-20 14:24:34 -05:00
pcie-uniphier.c PCI: uniphier: Fix a leaked reference by adding missing of_node_put() 2019-03-29 16:57:50 +00:00