]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: trivial sparse annotations
authorHarvey Harrison <harvey.harrison@gmail.com>
Thu, 24 Jul 2008 20:53:34 +0000 (22:53 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 24 Jul 2008 20:53:34 +0000 (22:53 +0200)
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-dma.c
drivers/ide/ide-iops.c
drivers/ide/ide-proc.c

index be99d463dcc7dfa0265498280e103715ee61bf61..71c377a7bcf2dd4f5f69af951fe5b10602d6bf82 100644 (file)
@@ -173,7 +173,7 @@ EXPORT_SYMBOL_GPL(ide_build_sglist);
 int ide_build_dmatable (ide_drive_t *drive, struct request *rq)
 {
        ide_hwif_t *hwif        = HWIF(drive);
-       unsigned int *table     = hwif->dmatable_cpu;
+       __le32 *table = (__le32 *)hwif->dmatable_cpu;
        unsigned int is_trm290  = (hwif->chipset == ide_trm290) ? 1 : 0;
        unsigned int count = 0;
        int i;
index 07da5fb9eaff0d760e93c5736b1b3dedb19f58de..8aae91764513afeaf71021bc5d32974683e8163d 100644 (file)
@@ -510,10 +510,8 @@ void ide_fixstring (u8 *s, const int bytecount, const int byteswap)
 
        if (byteswap) {
                /* convert from big-endian to host byte order */
-               for (p = end ; p != s;) {
-                       unsigned short *pp = (unsigned short *) (p -= 2);
-                       *pp = ntohs(*pp);
-               }
+               for (p = end ; p != s;)
+                       be16_to_cpus((u16 *)(p -= 2));
        }
        /* strip leading blanks */
        while (s != end && *s == ' ')
index 151c91e933dab156adb2606f4a55384fc4866ad0..f66c9c3f6fc6686d56479a56a902f88822544db3 100644 (file)
@@ -105,7 +105,7 @@ static int proc_ide_read_identify
        len = sprintf(page, "\n");
 
        if (drive) {
-               unsigned short *val = (unsigned short *) page;
+               __le16 *val = (__le16 *)page;
 
                err = taskfile_lib_get_identify(drive, page);
                if (!err) {
@@ -113,7 +113,7 @@ static int proc_ide_read_identify
                        page = out;
                        do {
                                out += sprintf(out, "%04x%c",
-                                       le16_to_cpu(*val), (++i & 7) ? ' ' : '\n');
+                                       le16_to_cpup(val), (++i & 7) ? ' ' : '\n');
                                val += 1;
                        } while (i < (SECTOR_WORDS * 2));
                        len = out - page;