aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-01-24 12:51:27 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-02-21 08:50:15 +0100
commit211deca6bf413560b562d69748ebc4df5d80d65e (patch)
treef7975539a30a9460ae32aca62e16b4951a2412b0 /arch/s390/include
parent4f41c2b4567dbfb7ff93e5c552b869e2865bcd9d (diff)
s390/uaccess: consistent types
The types 'size_t' and 'unsigned long' have been used randomly for the uaccess functions. This looks rather confusing. So let's change all functions to use unsigned long instead and get rid of size_t in order to have a consistent interface. The only exception is strncpy_from_user() which uses 'long' since it may return a signed value (-EFAULT). Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/uaccess.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
index 49885a518e5..2710b41eed2 100644
--- a/arch/s390/include/asm/uaccess.h
+++ b/arch/s390/include/asm/uaccess.h
@@ -111,8 +111,8 @@ int __handle_fault(unsigned long, unsigned long, int);
* If some data could not be copied, this function will pad the copied
* data to the requested size using zero bytes.
*/
-size_t __must_check __copy_from_user(void *to, const void __user *from,
- size_t n);
+unsigned long __must_check __copy_from_user(void *to, const void __user *from,
+ unsigned long n);
/**
* __copy_to_user: - Copy a block of data into user space, with less checking.
@@ -134,13 +134,13 @@ unsigned long __must_check __copy_to_user(void __user *to, const void *from,
#define __copy_to_user_inatomic __copy_to_user
#define __copy_from_user_inatomic __copy_from_user
-static inline int __put_user_fn(void *x, void __user *ptr, size_t size)
+static inline int __put_user_fn(void *x, void __user *ptr, unsigned long size)
{
size = __copy_to_user(ptr, x, size);
return size ? -EFAULT : 0;
}
-static inline int __get_user_fn(void *x, const void __user *ptr, size_t size)
+static inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size)
{
size = __copy_from_user(x, ptr, size);
return size ? -EFAULT : 0;
@@ -308,9 +308,9 @@ strncpy_from_user(char *dst, const char __user *src, long count)
return __strncpy_from_user(dst, src, count);
}
-size_t __must_check __strnlen_user(const char __user *src, size_t count);
+unsigned long __must_check __strnlen_user(const char __user *src, unsigned long count);
-static inline size_t strnlen_user(const char __user *src, size_t n)
+static inline unsigned long strnlen_user(const char __user *src, unsigned long n)
{
might_fault();
return __strnlen_user(src, n);
@@ -335,15 +335,15 @@ static inline size_t strnlen_user(const char __user *src, size_t n)
/*
* Zero Userspace
*/
-size_t __must_check __clear_user(void __user *to, size_t size);
+unsigned long __must_check __clear_user(void __user *to, unsigned long size);
-static inline size_t __must_check clear_user(void __user *to, size_t n)
+static inline unsigned long __must_check clear_user(void __user *to, unsigned long n)
{
might_fault();
return __clear_user(to, n);
}
-int copy_to_user_real(void __user *dest, void *src, size_t count);
-int copy_from_user_real(void *dest, void __user *src, size_t count);
+int copy_to_user_real(void __user *dest, void *src, unsigned long count);
+int copy_from_user_real(void *dest, void __user *src, unsigned long count);
#endif /* __S390_UACCESS_H */