Commit 937472b0 authored by Mike Frysinger's avatar Mike Frysinger Committed by Linus Torvalds
Browse files

use __val in __get_unaligned



Use "__val" rather than "val" in the __get_unaligned macro in
asm-generic/unaligned.h.  This way gcc wont warn if you happen to also name
something in the same scope "val".
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 07ff8ee7
...@@ -79,24 +79,24 @@ static inline void __ustw(__u16 val, __u16 *addr) ...@@ -79,24 +79,24 @@ static inline void __ustw(__u16 val, __u16 *addr)
#define __get_unaligned(ptr, size) ({ \ #define __get_unaligned(ptr, size) ({ \
const void *__gu_p = ptr; \ const void *__gu_p = ptr; \
__u64 val; \ __u64 __val; \
switch (size) { \ switch (size) { \
case 1: \ case 1: \
val = *(const __u8 *)__gu_p; \ __val = *(const __u8 *)__gu_p; \
break; \ break; \
case 2: \ case 2: \
val = __uldw(__gu_p); \ __val = __uldw(__gu_p); \
break; \ break; \
case 4: \ case 4: \
val = __uldl(__gu_p); \ __val = __uldl(__gu_p); \
break; \ break; \
case 8: \ case 8: \
val = __uldq(__gu_p); \ __val = __uldq(__gu_p); \
break; \ break; \
default: \ default: \
bad_unaligned_access_length(); \ bad_unaligned_access_length(); \
}; \ }; \
(__force __typeof__(*(ptr)))val; \ (__force __typeof__(*(ptr)))__val; \
}) })
#define __put_unaligned(val, ptr, size) \ #define __put_unaligned(val, ptr, size) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment