forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/arch/parisc/lib/checksum.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * INET An implementation of the TCP/IP protocol suite for the LINUX
34 * operating system. INET is implemented using the BSD Socket
....@@ -8,11 +9,6 @@
89 * Authors: Ralf Baechle, <ralf@waldorf-gmbh.de>
910 * Lots of code moved from tcp.c and ip.c; see those files
1011 * for more names.
11
- *
12
- * This program is free software; you can redistribute it and/or
13
- * modify it under the terms of the GNU General Public License
14
- * as published by the Free Software Foundation; either version
15
- * 2 of the License, or (at your option) any later version.
1612 */
1713 #include <linux/module.h>
1814 #include <linux/types.h>
....@@ -110,40 +106,3 @@
110106 }
111107
112108 EXPORT_SYMBOL(csum_partial);
113
-
114
-/*
115
- * copy while checksumming, otherwise like csum_partial
116
- */
117
-__wsum csum_partial_copy_nocheck(const void *src, void *dst,
118
- int len, __wsum sum)
119
-{
120
- /*
121
- * It's 2:30 am and I don't feel like doing it real ...
122
- * This is lots slower than the real thing (tm)
123
- */
124
- sum = csum_partial(src, len, sum);
125
- memcpy(dst, src, len);
126
-
127
- return sum;
128
-}
129
-EXPORT_SYMBOL(csum_partial_copy_nocheck);
130
-
131
-/*
132
- * Copy from userspace and compute checksum. If we catch an exception
133
- * then zero the rest of the buffer.
134
- */
135
-__wsum csum_partial_copy_from_user(const void __user *src,
136
- void *dst, int len,
137
- __wsum sum, int *err_ptr)
138
-{
139
- int missing;
140
-
141
- missing = copy_from_user(dst, src, len);
142
- if (missing) {
143
- memset(dst + len - missing, 0, missing);
144
- *err_ptr = -EFAULT;
145
- }
146
-
147
- return csum_partial(dst, len, sum);
148
-}
149
-EXPORT_SYMBOL(csum_partial_copy_from_user);