summaryrefslogtreecommitdiff
path: root/include/asm-sh64/uaccess.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-12 14:36:46 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-12 14:36:46 +0900
commit21264136ce7c3c7032c42e7c2440f5d89039ca5a (patch)
tree99f0552df91c45c41fba68caad7cff270b54beda /include/asm-sh64/uaccess.h
parentccdfc526a92c5ebb549a7de06adca3fd54f03c7e (diff)
sh64: Trivial build fixes.
While we've been sorting out the toolchain fiasco, some of the code has suffered a bit of bitrot. Building with GCC4 also brings up some more build warnings. Trivial fixes for both issues. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh64/uaccess.h')
-rw-r--r--include/asm-sh64/uaccess.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h
index f4936d8fa617..644c67b65f94 100644
--- a/include/asm-sh64/uaccess.h
+++ b/include/asm-sh64/uaccess.h
@@ -128,25 +128,20 @@ do { \
#define __get_user_nocheck(x,ptr,size) \
({ \
- long __gu_addr = (long)(ptr); \
- long __gu_err; \
- __typeof(*(ptr)) __gu_val; \
- __asm__ ("":"=r" (__gu_val)); \
- __asm__ ("":"=r" (__gu_err)); \
- __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \
- (x) = (__typeof__(*(ptr))) __gu_val; \
+ long __gu_err, __gu_val; \
+ __get_user_size((void *)&__gu_val, (long)(ptr), \
+ (size), __gu_err); \
+ (x) = (__typeof__(*(ptr)))__gu_val; \
__gu_err; \
})
#define __get_user_check(x,ptr,size) \
({ \
long __gu_addr = (long)(ptr); \
- long __gu_err = -EFAULT; \
- __typeof(*(ptr)) __gu_val; \
- __asm__ ("":"=r" (__gu_val)); \
- __asm__ ("":"=r" (__gu_err)); \
+ long __gu_err = -EFAULT, __gu_val; \
if (__access_ok(__gu_addr, (size))) \
- __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \
+ __get_user_size((void *)&__gu_val, __gu_addr, \
+ (size), __gu_err); \
(x) = (__typeof__(*(ptr))) __gu_val; \
__gu_err; \
})