]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] 32-bit: Fix warning about cast for fetching pointer from userspace.
authorRalf Baechle <ralf@linux-mips.org>
Tue, 13 Feb 2007 11:45:24 +0000 (11:45 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 13 Feb 2007 22:40:51 +0000 (22:40 +0000)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
include/asm-mips/uaccess.h

index c12ebc53ef317f4ac6bcd146736b65bde0f4243f..36b3a427f1235767ae2bc4d61d7156ad74081812 100644 (file)
@@ -265,7 +265,10 @@ do {                                                                       \
  */
 #define __get_user_asm_ll32(val, addr)                                 \
 {                                                                      \
-        unsigned long long __gu_tmp;                                   \
+       union {                                                         \
+               unsigned long long      l;                              \
+               __typeof__(*(addr))     t;                              \
+       } __gu_tmp;                                                     \
                                                                        \
        __asm__ __volatile__(                                           \
        "1:     lw      %1, (%3)                                \n"     \
@@ -281,9 +284,10 @@ do {                                                                       \
        "       " __UA_ADDR "   1b, 4b                          \n"     \
        "       " __UA_ADDR "   2b, 4b                          \n"     \
        "       .previous                                       \n"     \
-       : "=r" (__gu_err), "=&r" (__gu_tmp)                             \
+       : "=r" (__gu_err), "=&r" (__gu_tmp.l)                           \
        : "0" (0), "r" (addr), "i" (-EFAULT));                          \
-       (val) = (__typeof__(*(addr))) __gu_tmp;                         \
+                                                                       \
+       (val) = __gu_tmp.t;                                             \
 }
 
 /*