aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-07-24 16:53:34 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:34 -0400
commit7fa897b91a3ea0f16c2873b869d7a0eef05acff4 (patch)
treeb631e7db0745282689fd5a4dbe17ca10e31d5a78 /drivers/ide
parentcd740ab0f69f6c94d9c7f916758e308f30a439fa (diff)
ide: trivial sparse annotations
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-dma.c2
-rw-r--r--drivers/ide/ide-iops.c6
-rw-r--r--drivers/ide/ide-proc.c4
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index be99d463dcc7..71c377a7bcf2 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(ide_build_sglist);
173int ide_build_dmatable (ide_drive_t *drive, struct request *rq) 173int ide_build_dmatable (ide_drive_t *drive, struct request *rq)
174{ 174{
175 ide_hwif_t *hwif = HWIF(drive); 175 ide_hwif_t *hwif = HWIF(drive);
176 unsigned int *table = hwif->dmatable_cpu; 176 __le32 *table = (__le32 *)hwif->dmatable_cpu;
177 unsigned int is_trm290 = (hwif->chipset == ide_trm290) ? 1 : 0; 177 unsigned int is_trm290 = (hwif->chipset == ide_trm290) ? 1 : 0;
178 unsigned int count = 0; 178 unsigned int count = 0;
179 int i; 179 int i;
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 07da5fb9eaff..8aae91764513 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -510,10 +510,8 @@ void ide_fixstring (u8 *s, const int bytecount, const int byteswap)
510 510
511 if (byteswap) { 511 if (byteswap) {
512 /* convert from big-endian to host byte order */ 512 /* convert from big-endian to host byte order */
513 for (p = end ; p != s;) { 513 for (p = end ; p != s;)
514 unsigned short *pp = (unsigned short *) (p -= 2); 514 be16_to_cpus((u16 *)(p -= 2));
515 *pp = ntohs(*pp);
516 }
517 } 515 }
518 /* strip leading blanks */ 516 /* strip leading blanks */
519 while (s != end && *s == ' ') 517 while (s != end && *s == ' ')
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 151c91e933da..f66c9c3f6fc6 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -105,7 +105,7 @@ static int proc_ide_read_identify
105 len = sprintf(page, "\n"); 105 len = sprintf(page, "\n");
106 106
107 if (drive) { 107 if (drive) {
108 unsigned short *val = (unsigned short *) page; 108 __le16 *val = (__le16 *)page;
109 109
110 err = taskfile_lib_get_identify(drive, page); 110 err = taskfile_lib_get_identify(drive, page);
111 if (!err) { 111 if (!err) {
@@ -113,7 +113,7 @@ static int proc_ide_read_identify
113 page = out; 113 page = out;
114 do { 114 do {
115 out += sprintf(out, "%04x%c", 115 out += sprintf(out, "%04x%c",
116 le16_to_cpu(*val), (++i & 7) ? ' ' : '\n'); 116 le16_to_cpup(val), (++i & 7) ? ' ' : '\n');
117 val += 1; 117 val += 1;
118 } while (i < (SECTOR_WORDS * 2)); 118 } while (i < (SECTOR_WORDS * 2));
119 len = out - page; 119 len = out - page;