Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Mike Frysinger and committed by
Linus Torvalds
937472b0 07ff8ee7

+6 -6
+6 -6
include/asm-generic/unaligned.h
··· 79 79 80 80 #define __get_unaligned(ptr, size) ({ \ 81 81 const void *__gu_p = ptr; \ 82 - __u64 val; \ 82 + __u64 __val; \ 83 83 switch (size) { \ 84 84 case 1: \ 85 - val = *(const __u8 *)__gu_p; \ 85 + __val = *(const __u8 *)__gu_p; \ 86 86 break; \ 87 87 case 2: \ 88 - val = __uldw(__gu_p); \ 88 + __val = __uldw(__gu_p); \ 89 89 break; \ 90 90 case 4: \ 91 - val = __uldl(__gu_p); \ 91 + __val = __uldl(__gu_p); \ 92 92 break; \ 93 93 case 8: \ 94 - val = __uldq(__gu_p); \ 94 + __val = __uldq(__gu_p); \ 95 95 break; \ 96 96 default: \ 97 97 bad_unaligned_access_length(); \ 98 98 }; \ 99 - (__force __typeof__(*(ptr)))val; \ 99 + (__force __typeof__(*(ptr)))__val; \ 100 100 }) 101 101 102 102 #define __put_unaligned(val, ptr, size) \