summaryrefslogtreecommitdiffstats
path: root/arch/sh/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-07-13 05:05:44 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2020-08-20 21:45:18 +0200
commitdc16c8a9ce980d03cfeedbc2559744140d134130 (patch)
treeccf54e95caba8032c516d46e03910493088cf39d /arch/sh/include
parentm68k: get rid of zeroing destination on error in csum_and_copy_from_user() (diff)
downloadlinux-dc16c8a9ce980d03cfeedbc2559744140d134130.tar.xz
linux-dc16c8a9ce980d03cfeedbc2559744140d134130.zip
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 */