[PATCH 1/5] lib/crypto: arm/poly1305: Remove unneeded empty weak function
Eric Biggers
ebiggers at kernel.org
Sun Jul 6 16:10:56 PDT 2025
The __weak and empty definition of poly1305_blocks_neon() was a
workaround to prevent link errors when CONFIG_KERNEL_MODE_NEON=n, as
compilers didn't always optimize out the call.
This call is now guarded by IS_ENABLED(CONFIG_KERNEL_MODE_NEON). That
guarantees the call is removed at compile time when NEON support is
disabled. Therefore, the workaround is no longer needed.
Signed-off-by: Eric Biggers <ebiggers at kernel.org>
---
lib/crypto/arm/poly1305-glue.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/lib/crypto/arm/poly1305-glue.c b/lib/crypto/arm/poly1305-glue.c
index 2603b0771f2c..5b65b840c166 100644
--- a/lib/crypto/arm/poly1305-glue.c
+++ b/lib/crypto/arm/poly1305-glue.c
@@ -25,15 +25,10 @@ asmlinkage void poly1305_blocks_neon(struct poly1305_block_state *state,
asmlinkage void poly1305_emit_arch(const struct poly1305_state *state,
u8 digest[POLY1305_DIGEST_SIZE],
const u32 nonce[4]);
EXPORT_SYMBOL_GPL(poly1305_emit_arch);
-void __weak poly1305_blocks_neon(struct poly1305_block_state *state,
- const u8 *src, u32 len, u32 hibit)
-{
-}
-
static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_neon);
void poly1305_blocks_arch(struct poly1305_block_state *state, const u8 *src,
unsigned int len, u32 padbit)
{
--
2.50.0
More information about the linux-arm-kernel
mailing list