Message ID | 20090604094455.6479.7665.sendpatchset@rx1.opensource.se (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
--- 0001/arch/sh/include/asm/unaligned-sh4a.h +++ work/arch/sh/include/asm/unaligned-sh4a.h 2009-06-04 18:36:15.000000000 +0900 @@ -41,9 +41,9 @@ struct __una_u64 { u64 x __attribute__(( static inline u16 __get_unaligned_cpu16(const u8 *p) { #ifdef __LITTLE_ENDIAN - return __get_unaligned_cpu32(p) & 0xffff; + return p[0] | (p[1] << 8); #else - return __get_unaligned_cpu32(p) >> 16; + return (p[0] << 8) | p[1]; #endif }