hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/lib/checksum.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 *
34 * INET An implementation of the TCP/IP protocol suite for the LINUX
....@@ -22,11 +23,6 @@
2223 * data-registers to hold input values and one tries to
2324 * specify d0 and d1 as scratch registers. Letting gcc
2425 * choose these registers itself solves the problem.
25
- *
26
- * This program is free software; you can redistribute it and/or
27
- * modify it under the terms of the GNU General Public License
28
- * as published by the Free Software Foundation; either version
29
- * 2 of the License, or (at your option) any later version.
3026 */
3127
3228 /* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access
....@@ -148,37 +144,6 @@
148144 return (__force __sum16)~do_csum(buff, len);
149145 }
150146 EXPORT_SYMBOL(ip_compute_csum);
151
-
152
-/*
153
- * copy from fs while checksumming, otherwise like csum_partial
154
- */
155
-__wsum
156
-csum_partial_copy_from_user(const void __user *src, void *dst, int len,
157
- __wsum sum, int *csum_err)
158
-{
159
- int missing;
160
-
161
- missing = __copy_from_user(dst, src, len);
162
- if (missing) {
163
- memset(dst + len - missing, 0, missing);
164
- *csum_err = -EFAULT;
165
- } else
166
- *csum_err = 0;
167
-
168
- return csum_partial(dst, len, sum);
169
-}
170
-EXPORT_SYMBOL(csum_partial_copy_from_user);
171
-
172
-/*
173
- * copy from ds while checksumming, otherwise like csum_partial
174
- */
175
-__wsum
176
-csum_partial_copy(const void *src, void *dst, int len, __wsum sum)
177
-{
178
- memcpy(dst, src, len);
179
- return csum_partial(dst, len, sum);
180
-}
181
-EXPORT_SYMBOL(csum_partial_copy);
182147
183148 #ifndef csum_tcpudp_nofold
184149 static inline u32 from64to32(u64 x)