Skip to content

Commit

Permalink
use __val in __get_unaligned
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Jul 31, 2007
1 parent 07ff8ee commit 937472b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/asm-generic/unaligned.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,24 @@ static inline void __ustw(__u16 val, __u16 *addr)

#define __get_unaligned(ptr, size) ({ \
const void *__gu_p = ptr; \
__u64 val; \
__u64 __val; \
switch (size) { \
case 1: \
val = *(const __u8 *)__gu_p; \
__val = *(const __u8 *)__gu_p; \
break; \
case 2: \
val = __uldw(__gu_p); \
__val = __uldw(__gu_p); \
break; \
case 4: \
val = __uldl(__gu_p); \
__val = __uldl(__gu_p); \
break; \
case 8: \
val = __uldq(__gu_p); \
__val = __uldq(__gu_p); \
break; \
default: \
bad_unaligned_access_length(); \
}; \
(__force __typeof__(*(ptr)))val; \
(__force __typeof__(*(ptr)))__val; \
})

#define __put_unaligned(val, ptr, size) \
Expand Down

0 comments on commit 937472b

Please sign in to comment.