diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-02-18 14:26:32 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-05-29 16:11:50 -0400 |
commit | 5904122c46581a5ccee54a51ef07e0d891fd7aef (patch) | |
tree | 433bbafc1e3a3cdbfd291d51cfd858186683dff2 /arch/c6x | |
parent | 24f9aa928c3cc88bae573b39b6976844968f80a0 (diff) |
take the dummy csum_and_copy_from_user() into net/checksum.h
now that can be done conveniently - all non-trivial cases have
_HAVE_ARCH_COPY_AND_CSUM_FROM_USER defined, so the fallback in
net/checksum.h is used only for dummy (copy_from_user, then
csum_partial) implementation. Allowing us to get rid of all
dummy instances, both of csum_and_copy_from_user() and
csum_partial_copy_from_user().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/lib/checksum.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/c6x/lib/checksum.c b/arch/c6x/lib/checksum.c index 46940844c553..335ca4900808 100644 --- a/arch/c6x/lib/checksum.c +++ b/arch/c6x/lib/checksum.c @@ -4,28 +4,6 @@ #include <linux/module.h> #include <net/checksum.h> -#include <asm/byteorder.h> - -/* - * copy from fs while checksumming, otherwise like csum_partial - */ -__wsum -csum_partial_copy_from_user(const void __user *src, void *dst, int len, - __wsum sum, int *csum_err) -{ - int missing; - - missing = __copy_from_user(dst, src, len); - if (missing) { - memset(dst + len - missing, 0, missing); - *csum_err = -EFAULT; - } else - *csum_err = 0; - - return csum_partial(dst, len, sum); -} -EXPORT_SYMBOL(csum_partial_copy_from_user); - /* These are from csum_64plus.S */ EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy); |