diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-02-13 06:45:24 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-02-13 17:40:51 -0500 |
commit | cb66fb3f156b485b22db97db22e96db4786dc68b (patch) | |
tree | 72423101605fc154a03fb370b21b7702f5c4810b /include | |
parent | d01f06ef0c783eceb53030fc5407caa94586bd6a (diff) |
[MIPS] 32-bit: Fix warning about cast for fetching pointer from userspace.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/uaccess.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index c12ebc53ef31..36b3a427f123 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -265,7 +265,10 @@ do { \ | |||
265 | */ | 265 | */ |
266 | #define __get_user_asm_ll32(val, addr) \ | 266 | #define __get_user_asm_ll32(val, addr) \ |
267 | { \ | 267 | { \ |
268 | unsigned long long __gu_tmp; \ | 268 | union { \ |
269 | unsigned long long l; \ | ||
270 | __typeof__(*(addr)) t; \ | ||
271 | } __gu_tmp; \ | ||
269 | \ | 272 | \ |
270 | __asm__ __volatile__( \ | 273 | __asm__ __volatile__( \ |
271 | "1: lw %1, (%3) \n" \ | 274 | "1: lw %1, (%3) \n" \ |
@@ -281,9 +284,10 @@ do { \ | |||
281 | " " __UA_ADDR " 1b, 4b \n" \ | 284 | " " __UA_ADDR " 1b, 4b \n" \ |
282 | " " __UA_ADDR " 2b, 4b \n" \ | 285 | " " __UA_ADDR " 2b, 4b \n" \ |
283 | " .previous \n" \ | 286 | " .previous \n" \ |
284 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ | 287 | : "=r" (__gu_err), "=&r" (__gu_tmp.l) \ |
285 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 288 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
286 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | 289 | \ |
290 | (val) = __gu_tmp.t; \ | ||
287 | } | 291 | } |
288 | 292 | ||
289 | /* | 293 | /* |