Skip to content

Commit

Permalink
[PATCH] frv: make get_user macro cast pointers
Browse files Browse the repository at this point in the history
Make the get_user macro cast the source pointer to an appropriate type for the
specified size.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Jan 9, 2006
1 parent f8aec75 commit 5c15d41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/asm-frv/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,16 @@ do { \
\
switch (sizeof(*(ptr))) { \
case 1: \
__get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r"); \
__get_user_asm(__gu_err, *(u8*)&__gu_val, ptr, "ub", "=r"); \
break; \
case 2: \
__get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r"); \
__get_user_asm(__gu_err, *(u16*)&__gu_val, ptr, "uh", "=r"); \
break; \
case 4: \
__get_user_asm(__gu_err, __gu_val, ptr, "", "=r"); \
__get_user_asm(__gu_err, *(u32*)&__gu_val, ptr, "", "=r"); \
break; \
case 8: \
__get_user_asm(__gu_err, __gu_val, ptr, "d", "=e"); \
__get_user_asm(__gu_err, *(u64*)&__gu_val, ptr, "d", "=e"); \
break; \
default: \
__gu_err = __get_user_bad(); \
Expand Down

0 comments on commit 5c15d41

Please sign in to comment.