Messages in this thread | | | Date | Sun, 16 May 1999 17:06:47 -0400 | From | Mark Lord <> | Subject | Re: 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/
| |