Linux-ide Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v3 19/26] ata: sata_nv: Use PCI_STD_NUM_BARS
       [not found] <20190916204158.6889-1-efremov@linux.com>
@ 2019-09-16 20:41 ` Denis Efremov
  2019-09-16 20:41 ` [PATCH v3 22/26] pata_atp867x: " Denis Efremov
  1 sibling, 0 replies; 2+ messages in thread
From: Denis Efremov @ 2019-09-16 20:41 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Denis Efremov, linux-kernel, linux-pci, Andrew Murray, linux-ide,
	Jens Axboe

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 --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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v3 22/26] pata_atp867x: Use PCI_STD_NUM_BARS
       [not found] <20190916204158.6889-1-efremov@linux.com>
  2019-09-16 20:41 ` [PATCH v3 19/26] ata: sata_nv: Use PCI_STD_NUM_BARS Denis Efremov
@ 2019-09-16 20:41 ` " Denis Efremov
  1 sibling, 0 replies; 2+ messages in thread
From: Denis Efremov @ 2019-09-16 20:41 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Denis Efremov, linux-kernel, linux-pci, Andrew Murray, linux-ide,
	Bartlomiej Zolnierkiewicz, Jens Axboe

Use define PCI_STD_NUM_BARS instead of PCI_ROM_RESOURCE for the number of
PCI BARs.

Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 drivers/ata/pata_atp867x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c
index 2b9ed4ddef8d..019198eb7099 100644
--- a/drivers/ata/pata_atp867x.c
+++ b/drivers/ata/pata_atp867x.c
@@ -422,7 +422,7 @@ static int atp867x_ata_pci_sff_init_host(struct ata_host *host)
 #ifdef	ATP867X_DEBUG
 	atp867x_check_res(pdev);
 
-	for (i = 0; i < PCI_ROM_RESOURCE; i++)
+	for (i = 0; i < PCI_STD_NUM_BARS; i++)
 		printk(KERN_DEBUG "ATP867X: iomap[%d]=0x%llx\n", i,
 			(unsigned long long)(host->iomap[i]));
 #endif
-- 
2.21.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190916204158.6889-1-efremov@linux.com>
2019-09-16 20:41 ` [PATCH v3 19/26] ata: sata_nv: Use PCI_STD_NUM_BARS Denis Efremov
2019-09-16 20:41 ` [PATCH v3 22/26] pata_atp867x: " Denis Efremov

Linux-ide Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ide/0 linux-ide/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ide linux-ide/ https://lore.kernel.org/linux-ide \
		linux-ide@vger.kernel.org linux-ide@archiver.kernel.org
	public-inbox-index linux-ide

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ide


AGPL code for this site: git clone https://public-inbox.org/ public-inbox