]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
lib/crc32: drop leading underscores from __crc32c_le_base
authorEric Biggers <ebiggers@google.com>
Mon, 2 Dec 2024 01:08:26 +0000 (17:08 -0800)
committerEric Biggers <ebiggers@google.com>
Mon, 2 Dec 2024 01:23:01 +0000 (17:23 -0800)
Remove the leading underscores from __crc32c_le_base().

This is in preparation for adding crc32c_le_arch() and eventually
renaming __crc32c_le() to crc32c_le().

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20241202010844.144356-2-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
arch/arm64/lib/crc32-glue.c
arch/riscv/lib/crc32.c
crypto/crc32c_generic.c
include/linux/crc32.h
lib/crc32.c

index 295ae3e6b997ad64293cbf3f3be8e7f3beb750be..ad015223d15df151c318b8aedfead9543acb8d19 100644 (file)
@@ -44,7 +44,7 @@ u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
 u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
 {
        if (!alternative_has_cap_likely(ARM64_HAS_CRC32))
-               return __crc32c_le_base(crc, p, len);
+               return crc32c_le_base(crc, p, len);
 
        if (len >= min_len && cpu_have_named_feature(PMULL) && crypto_simd_usable()) {
                kernel_neon_begin();
index d7dc599af3ef6152a32e2594dc4c0c20ac48b388..333fb7af11922751c516c2b5be6d1fced1bf394c 100644 (file)
@@ -226,7 +226,7 @@ u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
 u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
 {
        return crc32_le_generic(crc, p, len, CRC32C_POLY_LE,
-                               CRC32C_POLY_QT_LE, __crc32c_le_base);
+                               CRC32C_POLY_QT_LE, crc32c_le_base);
 }
 
 static inline u32 crc32_be_unaligned(u32 crc, unsigned char const *p,
index 7c2357c30fdf7ebc4a98361042c645767da13092..635599b255ec04afd5880687fdda5c56591b6f3c 100644 (file)
@@ -85,7 +85,7 @@ static int chksum_update(struct shash_desc *desc, const u8 *data,
 {
        struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
 
-       ctx->crc = __crc32c_le_base(ctx->crc, data, length);
+       ctx->crc = crc32c_le_base(ctx->crc, data, length);
        return 0;
 }
 
@@ -108,7 +108,7 @@ static int chksum_final(struct shash_desc *desc, u8 *out)
 
 static int __chksum_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out)
 {
-       put_unaligned_le32(~__crc32c_le_base(*crcp, data, len), out);
+       put_unaligned_le32(~crc32c_le_base(*crcp, data, len), out);
        return 0;
 }
 
@@ -200,12 +200,12 @@ static struct shash_alg algs[] = {{
 static int __init crc32c_mod_init(void)
 {
        /* register the arch flavor only if it differs from the generic one */
-       return crypto_register_shashes(algs, 1 + (&__crc32c_le != &__crc32c_le_base));
+       return crypto_register_shashes(algs, 1 + (&__crc32c_le != &crc32c_le_base));
 }
 
 static void __exit crc32c_mod_fini(void)
 {
-       crypto_unregister_shashes(algs, 1 + (&__crc32c_le != &__crc32c_le_base));
+       crypto_unregister_shashes(algs, 1 + (&__crc32c_le != &crc32c_le_base));
 }
 
 subsys_initcall(crc32c_mod_init);
index 87f788c0d607bc139453d5c88a2e7134ba416479..5b07fc9081c474753253bba1262e76b22e53fb4b 100644 (file)
@@ -39,7 +39,7 @@ static inline u32 crc32_le_combine(u32 crc1, u32 crc2, size_t len2)
 }
 
 u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len);
-u32 __pure __crc32c_le_base(u32 crc, unsigned char const *p, size_t len);
+u32 __pure crc32c_le_base(u32 crc, unsigned char const *p, size_t len);
 
 /**
  * __crc32c_le_combine - Combine two crc32c check values into one. For two
index ff587fee3893dd9732ddec328cdd216a078e7ee0..c67059b0082b41f48cb70d86964b8286c738d1ac 100644 (file)
@@ -207,8 +207,8 @@ EXPORT_SYMBOL(__crc32c_le);
 u32 __pure crc32_le_base(u32, unsigned char const *, size_t) __alias(crc32_le);
 EXPORT_SYMBOL(crc32_le_base);
 
-u32 __pure __crc32c_le_base(u32, unsigned char const *, size_t) __alias(__crc32c_le);
-EXPORT_SYMBOL(__crc32c_le_base);
+u32 __pure crc32c_le_base(u32, unsigned char const *, size_t) __alias(__crc32c_le);
+EXPORT_SYMBOL(crc32c_le_base);
 
 u32 __pure crc32_be_base(u32, unsigned char const *, size_t) __alias(crc32_be);