diff options
-rw-r--r-- | include/asm-arm/unaligned.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-arm/unaligned.h b/include/asm-arm/unaligned.h index 8431f6eed5c6..5db03cf3b905 100644 --- a/include/asm-arm/unaligned.h +++ b/include/asm-arm/unaligned.h | |||
@@ -40,16 +40,16 @@ extern int __bug_unaligned_x(const void *ptr); | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define __get_unaligned_2_le(__p) \ | 42 | #define __get_unaligned_2_le(__p) \ |
43 | (__p[0] | __p[1] << 8) | 43 | (unsigned int)(__p[0] | __p[1] << 8) |
44 | 44 | ||
45 | #define __get_unaligned_2_be(__p) \ | 45 | #define __get_unaligned_2_be(__p) \ |
46 | (__p[0] << 8 | __p[1]) | 46 | (unsigned int)(__p[0] << 8 | __p[1]) |
47 | 47 | ||
48 | #define __get_unaligned_4_le(__p) \ | 48 | #define __get_unaligned_4_le(__p) \ |
49 | (__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24) | 49 | (unsigned int)(__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24) |
50 | 50 | ||
51 | #define __get_unaligned_4_be(__p) \ | 51 | #define __get_unaligned_4_be(__p) \ |
52 | (__p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3]) | 52 | (unsigned int)(__p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3]) |
53 | 53 | ||
54 | #define __get_unaligned_8_le(__p) \ | 54 | #define __get_unaligned_8_le(__p) \ |
55 | ((unsigned long long)__get_unaligned_4_le((__p+4)) << 32 | \ | 55 | ((unsigned long long)__get_unaligned_4_le((__p+4)) << 32 | \ |