summaryrefslogtreecommitdiffstats
path: root/include/asm-sh64/uaccess.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-12 17:31:36 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-12 17:31:36 -0700
commit7258ea8acd2252d5a68e7dfa2eac8dc8f364b91e (patch)
treea13594ddbd91b27c8afa49c1a2c6b4dc8141ae11 /include/asm-sh64/uaccess.h
parentaf84b99f22df115e7aec41d5dbe936e163ef4e2e (diff)
parent1bb99a649af92e53ed7391afaf6c2d45a6f57b42 (diff)
downloadop-kernel-dev-7258ea8acd2252d5a68e7dfa2eac8dc8f364b91e.zip
op-kernel-dev-7258ea8acd2252d5a68e7dfa2eac8dc8f364b91e.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6: sh64: Add a sane pm_power_off implementation. sh64: Use generic BUG_ON()/WARN_ON(). sh64: Trivial build fixes. sh64: Drop deprecated ISA tuning for legacy toolchains.
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 f4936d8..644c67b 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; \
})
OpenPOWER on IntegriCloud