Commit 75aca61b authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

Blackfin arch: add __must_check markings to our user functions like other arches

Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent d41e8009
...@@ -197,8 +197,8 @@ static inline int bad_user_access_length(void) ...@@ -197,8 +197,8 @@ static inline int bad_user_access_length(void)
#define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n))\ #define copy_from_user_ret(to,from,n,retval) ({ if (copy_from_user(to,from,n))\
return retval; }) return retval; })
static inline long copy_from_user(void *to, static inline unsigned long __must_check
const void __user * from, unsigned long n) copy_from_user(void *to, const void __user *from, unsigned long n)
{ {
if (access_ok(VERIFY_READ, from, n)) if (access_ok(VERIFY_READ, from, n))
memcpy(to, from, n); memcpy(to, from, n);
...@@ -207,8 +207,8 @@ static inline long copy_from_user(void *to, ...@@ -207,8 +207,8 @@ static inline long copy_from_user(void *to,
return 0; return 0;
} }
static inline long copy_to_user(void *to, static inline unsigned long __must_check
const void __user * from, unsigned long n) copy_to_user(void *to, const void __user *from, unsigned long n)
{ {
if (access_ok(VERIFY_WRITE, to, n)) if (access_ok(VERIFY_WRITE, to, n))
memcpy(to, from, n); memcpy(to, from, n);
...@@ -221,8 +221,8 @@ static inline long copy_to_user(void *to, ...@@ -221,8 +221,8 @@ static inline long copy_to_user(void *to,
* Copy a null terminated string from userspace. * Copy a null terminated string from userspace.
*/ */
static inline long strncpy_from_user(char *dst, static inline long __must_check
const char *src, long count) strncpy_from_user(char *dst, const char *src, long count)
{ {
char *tmp; char *tmp;
if (!access_ok(VERIFY_READ, src, 1)) if (!access_ok(VERIFY_READ, src, 1))
...@@ -248,7 +248,8 @@ static inline long strnlen_user(const char *src, long n) ...@@ -248,7 +248,8 @@ static inline long strnlen_user(const char *src, long n)
* Zero Userspace * Zero Userspace
*/ */
static inline unsigned long __clear_user(void *to, unsigned long n) static inline unsigned long __must_check
__clear_user(void *to, unsigned long n)
{ {
memset(to, 0, n); memset(to, 0, n);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment