aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include
diff options
context:
space:
mode:
authorAl Viro2020-07-12 23:05:44 -0400
committerAl Viro2020-08-20 15:45:18 -0400
commitdc16c8a9ce980d03cfeedbc2559744140d134130 (patch)
treeccf54e95caba8032c516d46e03910493088cf39d /arch/sh/include
parent66aa38801a5d1ea58b208d9d41374b9fac2088d3 (diff)
sh: propage the calling conventions change down to csum_partial_copy_generic()
... and get rid of zeroing destination on error there. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sh/include')
-rw-r--r--arch/sh/include/asm/checksum_32.h20
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/sh/include/asm/checksum_32.h b/arch/sh/include/asm/checksum_32.h
index a08e8eb924ed..1a391e3a7659 100644
--- a/arch/sh/include/asm/checksum_32.h
+++ b/arch/sh/include/asm/checksum_32.h
@@ -30,9 +30,7 @@ asmlinkage __wsum csum_partial(const void *buff, int len, __wsum sum);
* better 64-bit) boundary
*/
-asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst,
- int len, __wsum sum,
- int *src_err_ptr, int *dst_err_ptr);
+asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst, int len);
#define _HAVE_ARCH_CSUM_AND_COPY
/*
@@ -45,21 +43,16 @@ asmlinkage __wsum csum_partial_copy_generic(const void *src, void *dst,
static inline
__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len)
{
- return csum_partial_copy_generic(src, dst, len, 0, NULL, NULL);
+ return csum_partial_copy_generic(src, dst, len);
}
#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
static inline
__wsum csum_and_copy_from_user(const void __user *src, void *dst, int len)
{
- int err = 0;
- __wsum sum = ~0U;
-
if (!access_ok(src, len))
return 0;
- sum = csum_partial_copy_generic((__force const void *)src, dst,
- len, sum, &err, NULL);
- return err ? 0 : sum;
+ return csum_partial_copy_generic((__force const void *)src, dst, len);
}
/*
@@ -202,13 +195,8 @@ static inline __wsum csum_and_copy_to_user(const void *src,
void __user *dst,
int len)
{
- int err = 0;
- __wsum sum = ~0U;
-
if (!access_ok(dst, len))
return 0;
- sum = csum_partial_copy_generic((__force const void *)src,
- dst, len, sum, NULL, &err);
- return err ? 0 : sum;
+ return csum_partial_copy_generic((__force const void *)src, dst, len);
}
#endif /* __ASM_SH_CHECKSUM_H */