diff options
Diffstat (limited to 'arch/xtensa/include/asm/checksum.h')
-rw-r--r-- | arch/xtensa/include/asm/checksum.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/arch/xtensa/include/asm/checksum.h b/arch/xtensa/include/asm/checksum.h index fe78fba7bd64..44ec1d0b2a35 100644 --- a/arch/xtensa/include/asm/checksum.h +++ b/arch/xtensa/include/asm/checksum.h @@ -37,9 +37,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 /* @@ -49,7 +47,7 @@ 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 @@ -57,14 +55,9 @@ static inline __wsum csum_and_copy_from_user(const void __user *src, void *dst, int len) { - int err = 0; - if (!access_ok(src, len)) return 0; - - sum = csum_partial_copy_generic((__force const void *)src, dst, - len, ~0U, &err, NULL); - return err ? 0 : sum; + return csum_partial_copy_generic((__force const void *)src, dst, len); } /* @@ -247,13 +240,8 @@ static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, 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(src,dst,len,sum,NULL,&err); - return err ? 0 : sum; + return csum_partial_copy_generic(src, (__force void *)dst, len); } #endif |