diff options
Diffstat (limited to 'include/asm-sh/uaccess_64.h')
-rw-r--r-- | include/asm-sh/uaccess_64.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/include/asm-sh/uaccess_64.h b/include/asm-sh/uaccess_64.h index d54ec082d25a..f956b7b316c7 100644 --- a/include/asm-sh/uaccess_64.h +++ b/include/asm-sh/uaccess_64.h | |||
@@ -202,15 +202,6 @@ extern void __put_user_unknown(void); | |||
202 | /* XXX: should be such that: 4byte and the rest. */ | 202 | /* XXX: should be such that: 4byte and the rest. */ |
203 | extern __kernel_size_t __copy_user(void *__to, const void *__from, __kernel_size_t __n); | 203 | extern __kernel_size_t __copy_user(void *__to, const void *__from, __kernel_size_t __n); |
204 | 204 | ||
205 | #define copy_to_user(to,from,n) ({ \ | ||
206 | void *__copy_to = (void *) (to); \ | ||
207 | __kernel_size_t __copy_size = (__kernel_size_t) (n); \ | ||
208 | __kernel_size_t __copy_res; \ | ||
209 | if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \ | ||
210 | __copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \ | ||
211 | } else __copy_res = __copy_size; \ | ||
212 | __copy_res; }) | ||
213 | |||
214 | #define copy_to_user_ret(to,from,n,retval) ({ \ | 205 | #define copy_to_user_ret(to,from,n,retval) ({ \ |
215 | if (copy_to_user(to,from,n)) \ | 206 | if (copy_to_user(to,from,n)) \ |
216 | return retval; \ | 207 | return retval; \ |
@@ -225,16 +216,6 @@ if (__copy_to_user(to,from,n)) \ | |||
225 | return retval; \ | 216 | return retval; \ |
226 | }) | 217 | }) |
227 | 218 | ||
228 | #define copy_from_user(to,from,n) ({ \ | ||
229 | void *__copy_to = (void *) (to); \ | ||
230 | void *__copy_from = (void *) (from); \ | ||
231 | __kernel_size_t __copy_size = (__kernel_size_t) (n); \ | ||
232 | __kernel_size_t __copy_res; \ | ||
233 | if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \ | ||
234 | __copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \ | ||
235 | } else __copy_res = __copy_size; \ | ||
236 | __copy_res; }) | ||
237 | |||
238 | #define copy_from_user_ret(to,from,n,retval) ({ \ | 219 | #define copy_from_user_ret(to,from,n,retval) ({ \ |
239 | if (copy_from_user(to,from,n)) \ | 220 | if (copy_from_user(to,from,n)) \ |
240 | return retval; \ | 221 | return retval; \ |