summaryrefslogtreecommitdiffstats
path: root/lib/checksum.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-02-18 20:26:32 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2020-05-29 22:11:50 +0200
commit5904122c46581a5ccee54a51ef07e0d891fd7aef (patch)
tree433bbafc1e3a3cdbfd291d51cfd858186683dff2 /lib/checksum.c
parentarm: switch to csum_and_copy_from_user() (diff)
downloadlinux-5904122c46581a5ccee54a51ef07e0d891fd7aef.tar.xz
linux-5904122c46581a5ccee54a51ef07e0d891fd7aef.zip
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 'lib/checksum.c')
-rw-r--r--lib/checksum.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/checksum.c b/lib/checksum.c
index de032ad96f4a..7ac65a0000ff 100644
--- a/lib/checksum.c
+++ b/lib/checksum.c
@@ -146,26 +146,6 @@ __sum16 ip_compute_csum(const void *buff, int len)
EXPORT_SYMBOL(ip_compute_csum);
/*
- * 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);
-
-/*
* copy from ds while checksumming, otherwise like csum_partial
*/
__wsum