diff mbox series

[v3,09/26] ia64: Use PCI_STD_NUM_BARS

Message ID 20190916204158.6889-10-efremov@linux.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show
Series [RESEND,v3,01/26] PCI: Add define for the number of standard PCI BARs | expand

Commit Message

Denis Efremov Sept. 16, 2019, 8:41 p.m. UTC
Use define PCI_STD_NUM_BARS instead of PCI_ROM_RESOURCE for the number of
PCI BARs.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 arch/ia64/sn/pci/pcibr/pcibr_dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/ia64/sn/pci/pcibr/pcibr_dma.c b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
index 1e863b277ac9..ff981e415a28 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_dma.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_dma.c
@@ -295,14 +295,14 @@  void sn_dma_flush(u64 addr)
 	/* find a matching BAR */
 	for (i = 0; i < DEV_PER_WIDGET; i++,p++) {
 		common = p->common;
-		for (j = 0; j < PCI_ROM_RESOURCE; j++) {
+		for (j = 0; j < PCI_STD_NUM_BARS; j++) {
 			if (common->sfdl_bar_list[j].start == 0)
 				break;
 			if (addr >= common->sfdl_bar_list[j].start
 			    && addr <= common->sfdl_bar_list[j].end)
 				break;
 		}
-		if (j < PCI_ROM_RESOURCE && common->sfdl_bar_list[j].start != 0)
+		if (j < PCI_STD_NUM_BARS && common->sfdl_bar_list[j].start != 0)
 			break;
 	}