[PATCH] frv: make get_user macro cast pointers
authorDavid Howells <dhowells@redhat.com>
Sun, 8 Jan 2006 09:01:24 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:38 +0000 (20:13 -0800)
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>
include/asm-frv/uaccess.h

index 991b50fbba24d77b64c402389f2e93e0c48bb2a8..b6bcbe01f6ee43851e0f67570684010f529de01f 100644 (file)
@@ -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();                            \