1
0
Fork 0
alistair23-linux/drivers/net/ethernet/synopsys
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 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dwc-xlgmac-common.c net: dwc-xlgmac: Get rid of custom hex_dump_to_buffer() 2017-12-21 15:05:33 -05:00
dwc-xlgmac-desc.c net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
dwc-xlgmac-ethtool.c net: dwc-xlgmac: add the initial ethtool support 2017-04-13 13:46:38 -04:00
dwc-xlgmac-hw.c net: move skb->xmit_more hint to softnet data 2019-04-01 18:35:02 -07:00
dwc-xlgmac-net.c net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
dwc-xlgmac-pci.c PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
dwc-xlgmac-reg.h net: dwc-xlgmac: declaration of dual license in headers 2017-03-23 17:04:14 -07:00
dwc-xlgmac.h net: dwc-xlgmac: add the initial ethtool support 2017-04-13 13:46:38 -04:00