Commit 1cd95ab8 authored by Al Viro's avatar Al Viro

mips: propagate the calling convention change down into __csum_partial_copy_..._user()

and turn the exception handlers into simply returning 0, which
simplifies the hell out of things in csum_partial.S
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent f863c65c
...@@ -34,25 +34,17 @@ ...@@ -34,25 +34,17 @@
*/ */
__wsum csum_partial(const void *buff, int len, __wsum sum); __wsum csum_partial(const void *buff, int len, __wsum sum);
__wsum __csum_partial_copy_from_user(const void *src, void *dst, __wsum __csum_partial_copy_from_user(const void __user *src, void *dst, int len);
int len, __wsum sum, int *err_ptr); __wsum __csum_partial_copy_to_user(const void *src, void __user *dst, int len);
__wsum __csum_partial_copy_to_user(const void *src, void *dst,
int len, __wsum sum, int *err_ptr);
#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER #define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
static inline static inline
__wsum csum_and_copy_from_user(const void __user *src, void *dst, int len) __wsum csum_and_copy_from_user(const void __user *src, void *dst, int len)
{ {
__wsum sum = ~0U;
int err = 0;
might_fault(); might_fault();
if (!access_ok(src, len)) if (!access_ok(src, len))
return 0; return 0;
sum = __csum_partial_copy_from_user((__force void *)src, dst, return __csum_partial_copy_from_user(src, dst, len);
len, sum, &err);
return err ? 0 : sum;
} }
/* /*
...@@ -62,16 +54,10 @@ __wsum csum_and_copy_from_user(const void __user *src, void *dst, int len) ...@@ -62,16 +54,10 @@ __wsum csum_and_copy_from_user(const void __user *src, void *dst, int len)
static inline static inline
__wsum csum_and_copy_to_user(const void *src, void __user *dst, int len) __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len)
{ {
int err = 0;
__wsum sum = ~0U;
might_fault(); might_fault();
if (!access_ok(dst, len)) if (!access_ok(dst, len))
return 0; return 0;
sum = __csum_partial_copy_to_user(src, return __csum_partial_copy_to_user(src, dst, len);
(__force void *)dst,
len, sum, &err);
return err ? 0 : sum;
} }
/* /*
...@@ -79,10 +65,10 @@ __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len) ...@@ -79,10 +65,10 @@ __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len)
* we have just one address space, so this is identical to the above) * we have just one address space, so this is identical to the above)
*/ */
#define _HAVE_ARCH_CSUM_AND_COPY #define _HAVE_ARCH_CSUM_AND_COPY
__wsum __csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum); __wsum __csum_partial_copy_nocheck(const void *src, void *dst, int len);
static inline __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len) static inline __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len)
{ {
return __csum_partial_copy_nocheck(src, dst, len, 0); return __csum_partial_copy_nocheck(src, dst, len);
} }
/* /*
......
This diff is collapsed.
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