diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-07-12 23:53:10 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-08-20 15:45:18 -0400 |
commit | e8b95089990ceac4e5197db3c03737bf569f5081 (patch) | |
tree | a4daa20395fa30a564d2fe7beff53ed8a28fa2d2 /arch/x86/include/asm/checksum_32.h | |
parent | dc16c8a9ce980d03cfeedbc2559744140d134130 (diff) | |
download | linux-e8b95089990ceac4e5197db3c03737bf569f5081.tar.bz2 |
i386: propagate the calling conventions change down to csum_partial_copy_generic()
... and don't bother zeroing destination on error
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86/include/asm/checksum_32.h')
-rw-r--r-- | arch/x86/include/asm/checksum_32.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/include/asm/checksum_32.h b/arch/x86/include/asm/checksum_32.h index 5948cde9e4ad..17da95387997 100644 --- a/arch/x86/include/asm/checksum_32.h +++ b/arch/x86/include/asm/checksum_32.h @@ -27,9 +27,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); /* * Note: when you get a NULL pointer exception here this means someone @@ -40,23 +38,21 @@ 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); } static inline __wsum csum_and_copy_from_user(const void __user *src, void *dst, int len) { __wsum ret; - int err = 0; might_sleep(); if (!user_access_begin(src, len)) return 0; - ret = csum_partial_copy_generic((__force void *)src, dst, - len, ~0U, &err, NULL); + ret = csum_partial_copy_generic((__force void *)src, dst, len); user_access_end(); - return err ? 0 : ret; + return ret; } /* @@ -177,16 +173,14 @@ static inline __wsum csum_and_copy_to_user(const void *src, int len) { __wsum ret; - int err = 0; might_sleep(); if (!user_access_begin(dst, len)) return 0; - ret = csum_partial_copy_generic(src, (__force void *)dst, - len, ~0U, NULL, &err); + ret = csum_partial_copy_generic(src, (__force void *)dst, len); user_access_end(); - return err ? 0 : ret; + return ret; } #endif /* _ASM_X86_CHECKSUM_32_H */ |