[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190916204158.6889-20-efremov@linux.com>
Date: Mon, 16 Sep 2019 23:41:51 +0300
From: Denis Efremov <efremov@...ux.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Denis Efremov <efremov@...ux.com>, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, Andrew Murray <andrew.murray@....com>,
linux-ide@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: [PATCH v3 19/26] ata: sata_nv: Use PCI_STD_NUM_BARS
Replace the magic constant (6) with define PCI_STD_NUM_BARS representing
the number of PCI BARs.
Cc: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Denis Efremov <efremov@...ux.com>
---
drivers/ata/sata_nv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.21.0
Powered by blists - more mailing lists