Skip to content

Commit

Permalink
ide: trivial sparse annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Harvey Harrison authored and Bartlomiej Zolnierkiewicz committed Jul 24, 2008
1 parent cd740ab commit 7fa897b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 2 additions & 4 deletions drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 == ' ')
Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/ide-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ 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) {
char *out = ((char *)page) + (SECTOR_WORDS * 4);
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;
Expand Down

0 comments on commit 7fa897b

Please sign in to comment.