Skip to content

Commit 0a499a7

Browse files
committed
lib/crc32: drop leading underscores from __crc32c_le_base
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]>
1 parent 40384c8 commit 0a499a7

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

arch/arm64/lib/crc32-glue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
4444
u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
4545
{
4646
if (!alternative_has_cap_likely(ARM64_HAS_CRC32))
47-
return __crc32c_le_base(crc, p, len);
47+
return crc32c_le_base(crc, p, len);
4848

4949
if (len >= min_len && cpu_have_named_feature(PMULL) && crypto_simd_usable()) {
5050
kernel_neon_begin();

arch/riscv/lib/crc32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
226226
u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len)
227227
{
228228
return crc32_le_generic(crc, p, len, CRC32C_POLY_LE,
229-
CRC32C_POLY_QT_LE, __crc32c_le_base);
229+
CRC32C_POLY_QT_LE, crc32c_le_base);
230230
}
231231

232232
static inline u32 crc32_be_unaligned(u32 crc, unsigned char const *p,

crypto/crc32c_generic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int chksum_update(struct shash_desc *desc, const u8 *data,
8585
{
8686
struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
8787

88-
ctx->crc = __crc32c_le_base(ctx->crc, data, length);
88+
ctx->crc = crc32c_le_base(ctx->crc, data, length);
8989
return 0;
9090
}
9191

@@ -108,7 +108,7 @@ static int chksum_final(struct shash_desc *desc, u8 *out)
108108

109109
static int __chksum_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out)
110110
{
111-
put_unaligned_le32(~__crc32c_le_base(*crcp, data, len), out);
111+
put_unaligned_le32(~crc32c_le_base(*crcp, data, len), out);
112112
return 0;
113113
}
114114

@@ -200,12 +200,12 @@ static struct shash_alg algs[] = {{
200200
static int __init crc32c_mod_init(void)
201201
{
202202
/* register the arch flavor only if it differs from the generic one */
203-
return crypto_register_shashes(algs, 1 + (&__crc32c_le != &__crc32c_le_base));
203+
return crypto_register_shashes(algs, 1 + (&__crc32c_le != &crc32c_le_base));
204204
}
205205

206206
static void __exit crc32c_mod_fini(void)
207207
{
208-
crypto_unregister_shashes(algs, 1 + (&__crc32c_le != &__crc32c_le_base));
208+
crypto_unregister_shashes(algs, 1 + (&__crc32c_le != &crc32c_le_base));
209209
}
210210

211211
subsys_initcall(crc32c_mod_init);

include/linux/crc32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static inline u32 crc32_le_combine(u32 crc1, u32 crc2, size_t len2)
3939
}
4040

4141
u32 __pure __crc32c_le(u32 crc, unsigned char const *p, size_t len);
42-
u32 __pure __crc32c_le_base(u32 crc, unsigned char const *p, size_t len);
42+
u32 __pure crc32c_le_base(u32 crc, unsigned char const *p, size_t len);
4343

4444
/**
4545
* __crc32c_le_combine - Combine two crc32c check values into one. For two

lib/crc32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ EXPORT_SYMBOL(__crc32c_le);
207207
u32 __pure crc32_le_base(u32, unsigned char const *, size_t) __alias(crc32_le);
208208
EXPORT_SYMBOL(crc32_le_base);
209209

210-
u32 __pure __crc32c_le_base(u32, unsigned char const *, size_t) __alias(__crc32c_le);
211-
EXPORT_SYMBOL(__crc32c_le_base);
210+
u32 __pure crc32c_le_base(u32, unsigned char const *, size_t) __alias(__crc32c_le);
211+
EXPORT_SYMBOL(crc32c_le_base);
212212

213213
u32 __pure crc32_be_base(u32, unsigned char const *, size_t) __alias(crc32_be);
214214

0 commit comments

Comments
 (0)