Follow other architectures and add __must_check to uaccess functions.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* Returns number of bytes that could not be copied.
* On success, this will be zero.
*/
* Returns number of bytes that could not be copied.
* On success, this will be zero.
*/
-static inline unsigned long
+static inline unsigned long __must_check
__copy_to_user(void __user *to, const void *from, unsigned long n)
{
if (__builtin_constant_p(n) && (n <= 256))
__copy_to_user(void __user *to, const void *from, unsigned long n)
{
if (__builtin_constant_p(n) && (n <= 256))
* Returns number of bytes that could not be copied.
* On success, this will be zero.
*/
* Returns number of bytes that could not be copied.
* On success, this will be zero.
*/
-static inline unsigned long
+static inline unsigned long __must_check
copy_to_user(void __user *to, const void *from, unsigned long n)
{
might_sleep();
copy_to_user(void __user *to, const void *from, unsigned long n)
{
might_sleep();
* If some data could not be copied, this function will pad the copied
* data to the requested size using zero bytes.
*/
* If some data could not be copied, this function will pad the copied
* data to the requested size using zero bytes.
*/
-static inline unsigned long
+static inline unsigned long __must_check
__copy_from_user(void *to, const void __user *from, unsigned long n)
{
if (__builtin_constant_p(n) && (n <= 256))
__copy_from_user(void *to, const void __user *from, unsigned long n)
{
if (__builtin_constant_p(n) && (n <= 256))
* If some data could not be copied, this function will pad the copied
* data to the requested size using zero bytes.
*/
* If some data could not be copied, this function will pad the copied
* data to the requested size using zero bytes.
*/
-static inline unsigned long
+static inline unsigned long __must_check
copy_from_user(void *to, const void __user *from, unsigned long n)
{
might_sleep();
copy_from_user(void *to, const void __user *from, unsigned long n)
{
might_sleep();
-static inline unsigned long
+static inline unsigned long __must_check
__copy_in_user(void __user *to, const void __user *from, unsigned long n)
{
return uaccess.copy_in_user(n, to, from);
}
__copy_in_user(void __user *to, const void __user *from, unsigned long n)
{
return uaccess.copy_in_user(n, to, from);
}
-static inline unsigned long
+static inline unsigned long __must_check
copy_in_user(void __user *to, const void __user *from, unsigned long n)
{
might_sleep();
copy_in_user(void __user *to, const void __user *from, unsigned long n)
{
might_sleep();
/*
* Copy a null terminated string from userspace.
*/
/*
* Copy a null terminated string from userspace.
*/
+static inline long __must_check
strncpy_from_user(char *dst, const char __user *src, long count)
{
long res = -EFAULT;
strncpy_from_user(char *dst, const char __user *src, long count)
{
long res = -EFAULT;
-static inline unsigned long
+static inline unsigned long __must_check
__clear_user(void __user *to, unsigned long n)
{
return uaccess.clear_user(n, to);
}
__clear_user(void __user *to, unsigned long n)
{
return uaccess.clear_user(n, to);
}
-static inline unsigned long
+static inline unsigned long __must_check
clear_user(void __user *to, unsigned long n)
{
might_sleep();
clear_user(void __user *to, unsigned long n)
{
might_sleep();