diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 00:17:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-07 00:17:57 -0500 |
commit | ede6f5aea054d3fb67c78857f7abdee602302043 (patch) | |
tree | 45362cd6f23e2eddc0004c96c46bca4ad82c9bd3 /include/linux | |
parent | 637b180c23313f2964e0ef20f1ee375203866968 (diff) |
Fix up 64-bit byte swaps for most 32-bit architectures
The __SWAB_64_THRU_32__ case of a 64-bit byte swap was depending on the
no-longer-existant ___swab32() method (three underscores). We got rid
of some of the worst indirection and complexity, and now it should just
use the 32-bit swab function that was defined right above it.
Reported-and-tested-by: Nicolas Pitre <nico@cam.org>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/swab.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/swab.h b/include/linux/swab.h index 9a2d33e0a98a..be5284d4a053 100644 --- a/include/linux/swab.h +++ b/include/linux/swab.h | |||
@@ -68,7 +68,7 @@ static inline __attribute_const__ __u64 __fswab64(__u64 val) | |||
68 | #elif defined(__SWAB_64_THRU_32__) | 68 | #elif defined(__SWAB_64_THRU_32__) |
69 | __u32 h = val >> 32; | 69 | __u32 h = val >> 32; |
70 | __u32 l = val & ((1ULL << 32) - 1); | 70 | __u32 l = val & ((1ULL << 32) - 1); |
71 | return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h))); | 71 | return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h))); |
72 | #else | 72 | #else |
73 | return ___constant_swab64(val); | 73 | return ___constant_swab64(val); |
74 | #endif | 74 | #endif |