patch-2.4.0-test8 linux/include/asm-sh/uaccess.h
Next file: linux/include/asm-sparc/atomic.h
Previous file: linux/include/asm-s390/uaccess.h
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
Tue Aug 29 14:09:16 2000
- Orig file:
v2.4.0-test7/linux/include/asm-sh/uaccess.h
- Orig date:
Fri Jun 23 21:55:11 2000
diff -u --recursive --new-file v2.4.0-test7/linux/include/asm-sh/uaccess.h linux/include/asm-sh/uaccess.h
@@ -83,24 +83,6 @@
#define __put_user(x,ptr) __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
#define __get_user(x,ptr) __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
-/*
- * The "xxx_ret" versions return constant specified in third argument, if
- * something bad happens. These macros can be optimized for the
- * case of just returning from the function xxx_ret is used.
- */
-
-#define put_user_ret(x,ptr,ret) ({ \
-if (put_user(x,ptr)) return ret; })
-
-#define get_user_ret(x,ptr,ret) ({ \
-if (get_user(x,ptr)) return ret; })
-
-#define __put_user_ret(x,ptr,ret) ({ \
-if (__put_user(x,ptr)) return ret; })
-
-#define __get_user_ret(x,ptr,ret) ({ \
-if (__get_user(x,ptr)) return ret; })
-
struct __large_struct { unsigned long buf[100]; };
#define __m(x) (*(struct __large_struct *)(x))
@@ -256,20 +238,10 @@
} else __copy_res = __copy_size; \
__copy_res; })
-#define copy_to_user_ret(to,from,n,retval) ({ \
-if (copy_to_user(to,from,n)) \
- return retval; \
-})
-
#define __copy_to_user(to,from,n) \
__copy_user((void *)(to), \
(void *)(from), n)
-#define __copy_to_user_ret(to,from,n,retval) ({ \
-if (__copy_to_user(to,from,n)) \
- return retval; \
-})
-
#define copy_from_user(to,from,n) ({ \
void *__copy_to = (void *) (to); \
void *__copy_from = (void *) (from); \
@@ -280,19 +252,9 @@
} else __copy_res = __copy_size; \
__copy_res; })
-#define copy_from_user_ret(to,from,n,retval) ({ \
-if (copy_from_user(to,from,n)) \
- return retval; \
-})
-
#define __copy_from_user(to,from,n) \
__copy_user((void *)(to), \
(void *)(from), n)
-
-#define __copy_from_user_ret(to,from,n,retval) ({ \
-if (__copy_from_user(to,from,n)) \
- return retval; \
-})
/* XXX: Not sure it works well..
should be such that: 4byte clear and the rest. */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)