diff options
author | Tejun Heo <htejun@gmail.com> | 2007-02-20 11:06:51 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-21 04:58:20 -0500 |
commit | 44877b4e22f391d39c6589412106a3668e81a05b (patch) | |
tree | 10bf134c2c8c15e3504d67461b42f53c6de88523 /drivers/ata/sata_sx4.c | |
parent | 5ce0cf6fafd02fb4c43fc1a1bee6069d6c0a36b1 (diff) |
libata: s/ap->id/ap->print_id/g
ata_port has two different id fields - id and port_no. id is
system-wide 1-based unique id for the port while port_no is 0-based
host-wide port number. The former is primarily used to identify the
ATA port to the user in printk messages while the latter is used in
various places in libata core and LLDs to index the port inside the
host.
The two fields feel quite similar and sometimes ap->id is used in
place of ap->port_no, which is very difficult to spot. This patch
renames ap->id to ap->print_id to reduce the possibility of such bugs.
Some printk messages are adjusted such that id string (ata%u[.%u])
isn't printed twice and/or to use ata_*_printk() instead of hardcoded
id format.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_sx4.c')
-rw-r--r-- | drivers/ata/sata_sx4.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index 0ebd77b080d6..4fb8bfcefc0d 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
@@ -421,7 +421,7 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc) | |||
421 | 421 | ||
422 | WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); | 422 | WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); |
423 | 423 | ||
424 | VPRINTK("ata%u: ENTER\n", ap->id); | 424 | VPRINTK("ata%u: ENTER\n", ap->print_id); |
425 | 425 | ||
426 | /* hard-code chip #0 */ | 426 | /* hard-code chip #0 */ |
427 | mmio += PDC_CHIP0_OFS; | 427 | mmio += PDC_CHIP0_OFS; |
@@ -478,7 +478,7 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) | |||
478 | unsigned int portno = ap->port_no; | 478 | unsigned int portno = ap->port_no; |
479 | unsigned int i; | 479 | unsigned int i; |
480 | 480 | ||
481 | VPRINTK("ata%u: ENTER\n", ap->id); | 481 | VPRINTK("ata%u: ENTER\n", ap->print_id); |
482 | 482 | ||
483 | /* hard-code chip #0 */ | 483 | /* hard-code chip #0 */ |
484 | mmio += PDC_CHIP0_OFS; | 484 | mmio += PDC_CHIP0_OFS; |
@@ -605,7 +605,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) | |||
605 | /* hard-code chip #0 */ | 605 | /* hard-code chip #0 */ |
606 | mmio += PDC_CHIP0_OFS; | 606 | mmio += PDC_CHIP0_OFS; |
607 | 607 | ||
608 | VPRINTK("ata%u: ENTER\n", ap->id); | 608 | VPRINTK("ata%u: ENTER\n", ap->print_id); |
609 | 609 | ||
610 | wmb(); /* flush PRD, pkt writes */ | 610 | wmb(); /* flush PRD, pkt writes */ |
611 | 611 | ||
@@ -672,7 +672,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
672 | 672 | ||
673 | /* step two - DMA from DIMM to host */ | 673 | /* step two - DMA from DIMM to host */ |
674 | if (doing_hdma) { | 674 | if (doing_hdma) { |
675 | VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id, | 675 | VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->print_id, |
676 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 676 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
677 | /* get drive status; clear intr; complete txn */ | 677 | /* get drive status; clear intr; complete txn */ |
678 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); | 678 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |
@@ -683,7 +683,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
683 | /* step one - exec ATA command */ | 683 | /* step one - exec ATA command */ |
684 | else { | 684 | else { |
685 | u8 seq = (u8) (port_no + 1 + 4); | 685 | u8 seq = (u8) (port_no + 1 + 4); |
686 | VPRINTK("ata%u: read ata, 0x%x 0x%x\n", ap->id, | 686 | VPRINTK("ata%u: read ata, 0x%x 0x%x\n", ap->print_id, |
687 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 687 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
688 | 688 | ||
689 | /* submit hdma pkt */ | 689 | /* submit hdma pkt */ |
@@ -698,7 +698,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
698 | /* step one - DMA from host to DIMM */ | 698 | /* step one - DMA from host to DIMM */ |
699 | if (doing_hdma) { | 699 | if (doing_hdma) { |
700 | u8 seq = (u8) (port_no + 1); | 700 | u8 seq = (u8) (port_no + 1); |
701 | VPRINTK("ata%u: write hdma, 0x%x 0x%x\n", ap->id, | 701 | VPRINTK("ata%u: write hdma, 0x%x 0x%x\n", ap->print_id, |
702 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 702 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
703 | 703 | ||
704 | /* submit ata pkt */ | 704 | /* submit ata pkt */ |
@@ -711,7 +711,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
711 | 711 | ||
712 | /* step two - execute ATA command */ | 712 | /* step two - execute ATA command */ |
713 | else { | 713 | else { |
714 | VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id, | 714 | VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->print_id, |
715 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); | 715 | readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); |
716 | /* get drive status; clear intr; complete txn */ | 716 | /* get drive status; clear intr; complete txn */ |
717 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); | 717 | qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); |