From dc16c8a9ce980d03cfeedbc2559744140d134130 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 12 Jul 2020 23:05:44 -0400 Subject: 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 --- arch/sh/include/asm/checksum_32.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'arch/sh/include') 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 */ -- cgit v1.2.3