diff mbox series

[v3,19/26] ata: sata_nv: Use PCI_STD_NUM_BARS

Message ID 20190916204158.6889-20-efremov@linux.com
State Deferred
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
Replace the magic constant (6) with define PCI_STD_NUM_BARS representing
the number of PCI BARs.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 drivers/ata/sata_nv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index b44b4b64354c..31a32a4bb05b 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -2329,7 +2329,7 @@  static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
         // Make sure this is a SATA controller by counting the number of bars
         // (NVIDIA SATA controllers will always have six bars).  Otherwise,
         // it's an IDE controller and we ignore it.
-	for (bar = 0; bar < 6; bar++)
+	for (bar = 0; bar < PCI_STD_NUM_BARS; bar++)
 		if (pci_resource_start(pdev, bar) == 0)
 			return -ENODEV;