diff options
Diffstat (limited to 'include/asm-sh64/uaccess.h')
-rw-r--r-- | include/asm-sh64/uaccess.h | 19 |
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 { \ | |||
128 | 128 | ||
129 | #define __get_user_nocheck(x,ptr,size) \ | 129 | #define __get_user_nocheck(x,ptr,size) \ |
130 | ({ \ | 130 | ({ \ |
131 | long __gu_addr = (long)(ptr); \ | 131 | long __gu_err, __gu_val; \ |
132 | long __gu_err; \ | 132 | __get_user_size((void *)&__gu_val, (long)(ptr), \ |
133 | __typeof(*(ptr)) __gu_val; \ | 133 | (size), __gu_err); \ |
134 | __asm__ ("":"=r" (__gu_val)); \ | 134 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
135 | __asm__ ("":"=r" (__gu_err)); \ | ||
136 | __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ | ||
137 | (x) = (__typeof__(*(ptr))) __gu_val; \ | ||
138 | __gu_err; \ | 135 | __gu_err; \ |
139 | }) | 136 | }) |
140 | 137 | ||
141 | #define __get_user_check(x,ptr,size) \ | 138 | #define __get_user_check(x,ptr,size) \ |
142 | ({ \ | 139 | ({ \ |
143 | long __gu_addr = (long)(ptr); \ | 140 | long __gu_addr = (long)(ptr); \ |
144 | long __gu_err = -EFAULT; \ | 141 | long __gu_err = -EFAULT, __gu_val; \ |
145 | __typeof(*(ptr)) __gu_val; \ | ||
146 | __asm__ ("":"=r" (__gu_val)); \ | ||
147 | __asm__ ("":"=r" (__gu_err)); \ | ||
148 | if (__access_ok(__gu_addr, (size))) \ | 142 | if (__access_ok(__gu_addr, (size))) \ |
149 | __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ | 143 | __get_user_size((void *)&__gu_val, __gu_addr, \ |
144 | (size), __gu_err); \ | ||
150 | (x) = (__typeof__(*(ptr))) __gu_val; \ | 145 | (x) = (__typeof__(*(ptr))) __gu_val; \ |
151 | __gu_err; \ | 146 | __gu_err; \ |
152 | }) | 147 | }) |