lkml.org 
[lkml]   [1999]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: IDE problem?
Rogier Wolff wrote:
...
> lba_sects = (lba_sects << 16) | (lba_sects >> 16);
>...
> As "lba_sects" is defined a "long", this will be 64 bits on
> Alpha. Swapping the words with the "(lba_sects << 16) | (lba_sects >>
> 16);" wont work: you're counting on 32bit arithmetic. I recommend
> adding the appropriate & 0xffff's in there...

But the original data is only unsigned 32-bit,
so the word-swap shown above should work regardless
of the size of lba_sects (>= 32bits). Right?

--
mlord@pobox.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.320 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site