forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/arch/x86/um/asm/checksum.h
....@@ -20,42 +20,6 @@
2020 */
2121 extern __wsum csum_partial(const void *buff, int len, __wsum sum);
2222
23
-/*
24
- * Note: when you get a NULL pointer exception here this means someone
25
- * passed in an incorrect kernel address to one of these functions.
26
- *
27
- * If you use these functions directly please don't forget the
28
- * access_ok().
29
- */
30
-
31
-static __inline__
32
-__wsum csum_partial_copy_nocheck(const void *src, void *dst,
33
- int len, __wsum sum)
34
-{
35
- memcpy(dst, src, len);
36
- return csum_partial(dst, len, sum);
37
-}
38
-
39
-/*
40
- * the same as csum_partial, but copies from src while it
41
- * checksums, and handles user-space pointer exceptions correctly, when needed.
42
- *
43
- * here even more important to align src and dst on a 32-bit (or even
44
- * better 64-bit) boundary
45
- */
46
-
47
-static __inline__
48
-__wsum csum_partial_copy_from_user(const void __user *src, void *dst,
49
- int len, __wsum sum, int *err_ptr)
50
-{
51
- if (copy_from_user(dst, src, len)) {
52
- *err_ptr = -EFAULT;
53
- return (__force __wsum)-1;
54
- }
55
-
56
- return csum_partial(dst, len, sum);
57
-}
58
-
5923 /**
6024 * csum_fold - Fold and invert a 32bit checksum.
6125 * sum: 32bit unfolded sum