diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2007-12-30 04:32:22 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-01-23 05:24:15 -0500 |
commit | 4ca4e439640cd1d3659cbcf60e7a73c2ae0450b3 (patch) | |
tree | 659dceb7469341dca95d7a96774e787c3b510872 /drivers/ata | |
parent | 35a10a80daa04b7316d6bac1b1402cc347c35b1e (diff) |
libata annotations and fixes
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/ahci.c | 18 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 2 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 4 | ||||
-rw-r--r-- | drivers/ata/pata_cs5520.c | 2 | ||||
-rw-r--r-- | drivers/ata/pata_pdc2027x.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_promise.h | 2 | ||||
-rw-r--r-- | drivers/ata/sata_sx4.c | 9 |
7 files changed, 20 insertions, 19 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index cffad07c65bf..49761bc12cf2 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -198,18 +198,18 @@ enum { | |||
198 | }; | 198 | }; |
199 | 199 | ||
200 | struct ahci_cmd_hdr { | 200 | struct ahci_cmd_hdr { |
201 | u32 opts; | 201 | __le32 opts; |
202 | u32 status; | 202 | __le32 status; |
203 | u32 tbl_addr; | 203 | __le32 tbl_addr; |
204 | u32 tbl_addr_hi; | 204 | __le32 tbl_addr_hi; |
205 | u32 reserved[4]; | 205 | __le32 reserved[4]; |
206 | }; | 206 | }; |
207 | 207 | ||
208 | struct ahci_sg { | 208 | struct ahci_sg { |
209 | u32 addr; | 209 | __le32 addr; |
210 | u32 addr_hi; | 210 | __le32 addr_hi; |
211 | u32 reserved; | 211 | __le32 reserved; |
212 | u32 flags_size; | 212 | __le32 flags_size; |
213 | }; | 213 | }; |
214 | 214 | ||
215 | struct ahci_host_priv { | 215 | struct ahci_host_priv { |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4020a1d3eb2c..8c82193b077e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4949,7 +4949,7 @@ unsigned int ata_data_xfer(struct ata_device *dev, unsigned char *buf, | |||
4949 | 4949 | ||
4950 | /* Transfer trailing 1 byte, if any. */ | 4950 | /* Transfer trailing 1 byte, if any. */ |
4951 | if (unlikely(buflen & 0x01)) { | 4951 | if (unlikely(buflen & 0x01)) { |
4952 | u16 align_buf[1] = { 0 }; | 4952 | __le16 align_buf[1] = { 0 }; |
4953 | unsigned char *trailing_buf = buf + buflen - 1; | 4953 | unsigned char *trailing_buf = buf + buflen - 1; |
4954 | 4954 | ||
4955 | if (rw == READ) { | 4955 | if (rw == READ) { |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 42bf61599730..15a4c8a20358 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -2210,7 +2210,7 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf, | |||
2210 | 2210 | ||
2211 | /* sector size */ | 2211 | /* sector size */ |
2212 | ATA_SCSI_RBUF_SET(6, ATA_SECT_SIZE >> 8); | 2212 | ATA_SCSI_RBUF_SET(6, ATA_SECT_SIZE >> 8); |
2213 | ATA_SCSI_RBUF_SET(7, ATA_SECT_SIZE); | 2213 | ATA_SCSI_RBUF_SET(7, ATA_SECT_SIZE & 0xff); |
2214 | } else { | 2214 | } else { |
2215 | /* sector count, 64-bit */ | 2215 | /* sector count, 64-bit */ |
2216 | ATA_SCSI_RBUF_SET(0, last_lba >> (8 * 7)); | 2216 | ATA_SCSI_RBUF_SET(0, last_lba >> (8 * 7)); |
@@ -2224,7 +2224,7 @@ unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf, | |||
2224 | 2224 | ||
2225 | /* sector size */ | 2225 | /* sector size */ |
2226 | ATA_SCSI_RBUF_SET(10, ATA_SECT_SIZE >> 8); | 2226 | ATA_SCSI_RBUF_SET(10, ATA_SECT_SIZE >> 8); |
2227 | ATA_SCSI_RBUF_SET(11, ATA_SECT_SIZE); | 2227 | ATA_SCSI_RBUF_SET(11, ATA_SECT_SIZE & 0xff); |
2228 | } | 2228 | } |
2229 | 2229 | ||
2230 | return 0; | 2230 | return 0; |
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index 33f7f0843f4f..d4590f546c49 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c | |||
@@ -198,7 +198,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi | |||
198 | }; | 198 | }; |
199 | const struct ata_port_info *ppi[2]; | 199 | const struct ata_port_info *ppi[2]; |
200 | u8 pcicfg; | 200 | u8 pcicfg; |
201 | void *iomap[5]; | 201 | void __iomem *iomap[5]; |
202 | struct ata_host *host; | 202 | struct ata_host *host; |
203 | struct ata_ioports *ioaddr; | 203 | struct ata_ioports *ioaddr; |
204 | int i, rc; | 204 | int i, rc; |
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 2622577521a1..028af5dbeed6 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c | |||
@@ -348,7 +348,7 @@ static unsigned long pdc2027x_mode_filter(struct ata_device *adev, unsigned long | |||
348 | ata_id_c_string(pair->id, model_num, ATA_ID_PROD, | 348 | ata_id_c_string(pair->id, model_num, ATA_ID_PROD, |
349 | ATA_ID_PROD_LEN + 1); | 349 | ATA_ID_PROD_LEN + 1); |
350 | /* If the master is a maxtor in UDMA6 then the slave should not use UDMA 6 */ | 350 | /* If the master is a maxtor in UDMA6 then the slave should not use UDMA 6 */ |
351 | if (strstr(model_num, "Maxtor") == 0 && pair->dma_mode == XFER_UDMA_6) | 351 | if (strstr(model_num, "Maxtor") == NULL && pair->dma_mode == XFER_UDMA_6) |
352 | mask &= ~ (1 << (6 + ATA_SHIFT_UDMA)); | 352 | mask &= ~ (1 << (6 + ATA_SHIFT_UDMA)); |
353 | 353 | ||
354 | return ata_pci_default_filter(adev, mask); | 354 | return ata_pci_default_filter(adev, mask); |
diff --git a/drivers/ata/sata_promise.h b/drivers/ata/sata_promise.h index 6ee5e190262d..00d6000e546f 100644 --- a/drivers/ata/sata_promise.h +++ b/drivers/ata/sata_promise.h | |||
@@ -46,7 +46,7 @@ static inline unsigned int pdc_pkt_header(struct ata_taskfile *tf, | |||
46 | unsigned int devno, u8 *buf) | 46 | unsigned int devno, u8 *buf) |
47 | { | 47 | { |
48 | u8 dev_reg; | 48 | u8 dev_reg; |
49 | u32 *buf32 = (u32 *) buf; | 49 | __le32 *buf32 = (__le32 *) buf; |
50 | 50 | ||
51 | /* set control bits (byte 0), zero delay seq id (byte 3), | 51 | /* set control bits (byte 0), zero delay seq id (byte 3), |
52 | * and seq id (byte 2) | 52 | * and seq id (byte 2) |
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index 211ba8da64f4..e3d56bc6726d 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
@@ -334,7 +334,7 @@ static inline void pdc20621_ata_sg(struct ata_taskfile *tf, u8 *buf, | |||
334 | { | 334 | { |
335 | u32 addr; | 335 | u32 addr; |
336 | unsigned int dw = PDC_DIMM_APKT_PRD >> 2; | 336 | unsigned int dw = PDC_DIMM_APKT_PRD >> 2; |
337 | u32 *buf32 = (u32 *) buf; | 337 | __le32 *buf32 = (__le32 *) buf; |
338 | 338 | ||
339 | /* output ATA packet S/G table */ | 339 | /* output ATA packet S/G table */ |
340 | addr = PDC_20621_DIMM_BASE + PDC_20621_DIMM_DATA + | 340 | addr = PDC_20621_DIMM_BASE + PDC_20621_DIMM_DATA + |
@@ -356,7 +356,7 @@ static inline void pdc20621_host_sg(struct ata_taskfile *tf, u8 *buf, | |||
356 | { | 356 | { |
357 | u32 addr; | 357 | u32 addr; |
358 | unsigned int dw = PDC_DIMM_HPKT_PRD >> 2; | 358 | unsigned int dw = PDC_DIMM_HPKT_PRD >> 2; |
359 | u32 *buf32 = (u32 *) buf; | 359 | __le32 *buf32 = (__le32 *) buf; |
360 | 360 | ||
361 | /* output Host DMA packet S/G table */ | 361 | /* output Host DMA packet S/G table */ |
362 | addr = PDC_20621_DIMM_BASE + PDC_20621_DIMM_DATA + | 362 | addr = PDC_20621_DIMM_BASE + PDC_20621_DIMM_DATA + |
@@ -377,7 +377,7 @@ static inline unsigned int pdc20621_ata_pkt(struct ata_taskfile *tf, | |||
377 | unsigned int portno) | 377 | unsigned int portno) |
378 | { | 378 | { |
379 | unsigned int i, dw; | 379 | unsigned int i, dw; |
380 | u32 *buf32 = (u32 *) buf; | 380 | __le32 *buf32 = (__le32 *) buf; |
381 | u8 dev_reg; | 381 | u8 dev_reg; |
382 | 382 | ||
383 | unsigned int dimm_sg = PDC_20621_DIMM_BASE + | 383 | unsigned int dimm_sg = PDC_20621_DIMM_BASE + |
@@ -429,7 +429,8 @@ static inline void pdc20621_host_pkt(struct ata_taskfile *tf, u8 *buf, | |||
429 | unsigned int portno) | 429 | unsigned int portno) |
430 | { | 430 | { |
431 | unsigned int dw; | 431 | unsigned int dw; |
432 | u32 tmp, *buf32 = (u32 *) buf; | 432 | u32 tmp; |
433 | __le32 *buf32 = (__le32 *) buf; | ||
433 | 434 | ||
434 | unsigned int host_sg = PDC_20621_DIMM_BASE + | 435 | unsigned int host_sg = PDC_20621_DIMM_BASE + |
435 | (PDC_DIMM_WINDOW_STEP * portno) + | 436 | (PDC_DIMM_WINDOW_STEP * portno) + |