Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112871
b: refs/heads/master
c: 1a7809e
h: refs/heads/master
i:
  112869: 9b0f4ba
  112867: 15e7be7
  112863: da76ba7
v: v3
  • Loading branch information
Linus Torvalds authored and Bartlomiej Zolnierkiewicz committed Oct 10, 2008
1 parent af3bae0 commit e6b7720
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c619ffd48d7fdb3b17f0df67c4eb4b0bd80e253
refs/heads/master: 1a7809e3499921a016d203b9ee51a77d3cc1dc98
8 changes: 5 additions & 3 deletions trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,16 @@ void ide_fix_driveid(u16 *id)

void ide_fixstring (u8 *s, const int bytecount, const int byteswap)
{
u8 *p = s, *end = &s[bytecount & ~1]; /* bytecount must be even */
u8 *p, *end = &s[bytecount & ~1]; /* bytecount must be even */

if (byteswap) {
/* convert from big-endian to host byte order */
for (p = end ; p != s;)
be16_to_cpus((u16 *)(p -= 2));
for (p = s ; p != end ; p += 2)
be16_to_cpus((u16 *) p);
}

/* strip leading blanks */
p = s;
while (s != end && *s == ' ')
++s;
/* compress internal blanks and strip trailing blanks */
Expand Down

0 comments on commit e6b7720

Please sign in to comment.