hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/lib/crc32.c
....@@ -24,7 +24,7 @@
2424 * Version 2. See the file COPYING for more details.
2525 */
2626
27
-/* see: Documentation/crc32.txt for a description of algorithms */
27
+/* see: Documentation/staging/crc32.rst for a description of algorithms */
2828
2929 #include <linux/crc32.h>
3030 #include <linux/crc32poly.h>
....@@ -183,21 +183,21 @@
183183 }
184184
185185 #if CRC_LE_BITS == 1
186
-u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
186
+u32 __pure __weak crc32_le(u32 crc, unsigned char const *p, size_t len)
187187 {
188188 return crc32_le_generic(crc, p, len, NULL, CRC32_POLY_LE);
189189 }
190
-u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
190
+u32 __pure __weak __crc32c_le(u32 crc, unsigned char const *p, size_t len)
191191 {
192192 return crc32_le_generic(crc, p, len, NULL, CRC32C_POLY_LE);
193193 }
194194 #else
195
-u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
195
+u32 __pure __weak crc32_le(u32 crc, unsigned char const *p, size_t len)
196196 {
197197 return crc32_le_generic(crc, p, len,
198198 (const u32 (*)[256])crc32table_le, CRC32_POLY_LE);
199199 }
200
-u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
200
+u32 __pure __weak __crc32c_le(u32 crc, unsigned char const *p, size_t len)
201201 {
202202 return crc32_le_generic(crc, p, len,
203203 (const u32 (*)[256])crc32ctable_le, CRC32C_POLY_LE);
....@@ -206,6 +206,9 @@
206206 EXPORT_SYMBOL(crc32_le);
207207 EXPORT_SYMBOL(__crc32c_le);
208208
209
+u32 __pure crc32_le_base(u32, unsigned char const *, size_t) __alias(crc32_le);
210
+u32 __pure __crc32c_le_base(u32, unsigned char const *, size_t) __alias(__crc32c_le);
211
+
209212 /*
210213 * This multiplies the polynomials x and y modulo the given modulus.
211214 * This follows the "little-endian" CRC convention that the lsbit