diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-03-25 01:18:11 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:20 -0400 |
commit | 826cd156de6cea1e4982f32238077215cfa4ae63 (patch) | |
tree | 7c74d82ef9a5331b48b2d2c2b4310757d08f169b /drivers/ata | |
parent | 9c0bf675054883acd10dec99c0c854514e139f06 (diff) |
libata annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_scc.c | 12 | ||||
-rw-r--r-- | drivers/ata/sata_promise.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_sx4.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index 2ed480ef0ff..fba5bed0a64 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c | |||
@@ -782,28 +782,28 @@ static unsigned int scc_data_xfer (struct ata_device *dev, unsigned char *buf, | |||
782 | struct ata_port *ap = dev->link->ap; | 782 | struct ata_port *ap = dev->link->ap; |
783 | unsigned int words = buflen >> 1; | 783 | unsigned int words = buflen >> 1; |
784 | unsigned int i; | 784 | unsigned int i; |
785 | u16 *buf16 = (u16 *) buf; | 785 | __le16 *buf16 = (__le16 *) buf; |
786 | void __iomem *mmio = ap->ioaddr.data_addr; | 786 | void __iomem *mmio = ap->ioaddr.data_addr; |
787 | 787 | ||
788 | /* Transfer multiple of 2 bytes */ | 788 | /* Transfer multiple of 2 bytes */ |
789 | if (rw == READ) | 789 | if (rw == READ) |
790 | for (i = 0; i < words; i++) | 790 | for (i = 0; i < words; i++) |
791 | buf16[i] = le16_to_cpu(in_be32(mmio)); | 791 | buf16[i] = cpu_to_le16(in_be32(mmio)); |
792 | else | 792 | else |
793 | for (i = 0; i < words; i++) | 793 | for (i = 0; i < words; i++) |
794 | out_be32(mmio, cpu_to_le16(buf16[i])); | 794 | out_be32(mmio, le16_to_cpu(buf16[i])); |
795 | 795 | ||
796 | /* Transfer trailing 1 byte, if any. */ | 796 | /* Transfer trailing 1 byte, if any. */ |
797 | if (unlikely(buflen & 0x01)) { | 797 | if (unlikely(buflen & 0x01)) { |
798 | u16 align_buf[1] = { 0 }; | 798 | __le16 align_buf[1] = { 0 }; |
799 | unsigned char *trailing_buf = buf + buflen - 1; | 799 | unsigned char *trailing_buf = buf + buflen - 1; |
800 | 800 | ||
801 | if (rw == READ) { | 801 | if (rw == READ) { |
802 | align_buf[0] = le16_to_cpu(in_be32(mmio)); | 802 | align_buf[0] = cpu_to_le16(in_be32(mmio)); |
803 | memcpy(trailing_buf, align_buf, 1); | 803 | memcpy(trailing_buf, align_buf, 1); |
804 | } else { | 804 | } else { |
805 | memcpy(align_buf, trailing_buf, 1); | 805 | memcpy(align_buf, trailing_buf, 1); |
806 | out_be32(mmio, cpu_to_le16(align_buf[0])); | 806 | out_be32(mmio, le16_to_cpu(align_buf[0])); |
807 | } | 807 | } |
808 | words++; | 808 | words++; |
809 | } | 809 | } |
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index 91659dc15ca..5a0a03a08ab 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -405,7 +405,7 @@ static void pdc_atapi_pkt(struct ata_queued_cmd *qc) | |||
405 | u8 *cdb = qc->cdb; | 405 | u8 *cdb = qc->cdb; |
406 | struct pdc_port_priv *pp = ap->private_data; | 406 | struct pdc_port_priv *pp = ap->private_data; |
407 | u8 *buf = pp->pkt; | 407 | u8 *buf = pp->pkt; |
408 | u32 *buf32 = (u32 *) buf; | 408 | __le32 *buf32 = (__le32 *) buf; |
409 | unsigned int dev_sel, feature; | 409 | unsigned int dev_sel, feature; |
410 | 410 | ||
411 | /* set control bits (byte 0), zero delay seq id (byte 3), | 411 | /* set control bits (byte 0), zero delay seq id (byte 3), |
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index 8138cda86a6..8d7f39532d4 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
@@ -464,7 +464,7 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc) | |||
464 | void __iomem *dimm_mmio = ap->host->iomap[PDC_DIMM_BAR]; | 464 | void __iomem *dimm_mmio = ap->host->iomap[PDC_DIMM_BAR]; |
465 | unsigned int portno = ap->port_no; | 465 | unsigned int portno = ap->port_no; |
466 | unsigned int i, si, idx, total_len = 0, sgt_len; | 466 | unsigned int i, si, idx, total_len = 0, sgt_len; |
467 | u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; | 467 | __le32 *buf = (__le32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; |
468 | 468 | ||
469 | WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); | 469 | WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); |
470 | 470 | ||