Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib/crypto: chacha: Remove unused function chacha_is_arch_optimized()

chacha_is_arch_optimized() is no longer used, so remove it.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20250827151131.27733-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>

-52
-9
include/crypto/chacha.h
··· 119 119 memzero_explicit(state, sizeof(*state)); 120 120 } 121 121 122 - #if IS_ENABLED(CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA) 123 - bool chacha_is_arch_optimized(void); 124 - #else 125 - static inline bool chacha_is_arch_optimized(void) 126 - { 127 - return false; 128 - } 129 - #endif 130 - 131 122 #endif /* _CRYPTO_CHACHA_H */
-7
lib/crypto/arm/chacha-glue.c
··· 101 101 } 102 102 EXPORT_SYMBOL(chacha_crypt_arch); 103 103 104 - bool chacha_is_arch_optimized(void) 105 - { 106 - /* We always can use at least the ARM scalar implementation. */ 107 - return true; 108 - } 109 - EXPORT_SYMBOL(chacha_is_arch_optimized); 110 - 111 104 static int __init chacha_arm_mod_init(void) 112 105 { 113 106 if (IS_ENABLED(CONFIG_KERNEL_MODE_NEON) && (elf_hwcap & HWCAP_NEON)) {
-6
lib/crypto/arm64/chacha-neon-glue.c
··· 95 95 } 96 96 EXPORT_SYMBOL(chacha_crypt_arch); 97 97 98 - bool chacha_is_arch_optimized(void) 99 - { 100 - return static_key_enabled(&have_neon); 101 - } 102 - EXPORT_SYMBOL(chacha_is_arch_optimized); 103 - 104 98 static int __init chacha_simd_mod_init(void) 105 99 { 106 100 if (cpu_have_named_feature(ASIMD))
-6
lib/crypto/mips/chacha-glue.c
··· 18 18 u32 out[HCHACHA_OUT_WORDS], int nrounds); 19 19 EXPORT_SYMBOL(hchacha_block_arch); 20 20 21 - bool chacha_is_arch_optimized(void) 22 - { 23 - return true; 24 - } 25 - EXPORT_SYMBOL(chacha_is_arch_optimized); 26 - 27 21 MODULE_DESCRIPTION("ChaCha and HChaCha functions (MIPS optimized)"); 28 22 MODULE_AUTHOR("Ard Biesheuvel <ard.biesheuvel@linaro.org>"); 29 23 MODULE_LICENSE("GPL v2");
-6
lib/crypto/powerpc/chacha-p10-glue.c
··· 76 76 } 77 77 EXPORT_SYMBOL(chacha_crypt_arch); 78 78 79 - bool chacha_is_arch_optimized(void) 80 - { 81 - return static_key_enabled(&have_p10); 82 - } 83 - EXPORT_SYMBOL(chacha_is_arch_optimized); 84 - 85 79 static int __init chacha_p10_init(void) 86 80 { 87 81 if (cpu_has_feature(CPU_FTR_ARCH_31))
-6
lib/crypto/riscv/chacha-riscv64-glue.c
··· 50 50 } 51 51 EXPORT_SYMBOL(chacha_crypt_arch); 52 52 53 - bool chacha_is_arch_optimized(void) 54 - { 55 - return static_key_enabled(&use_zvkb); 56 - } 57 - EXPORT_SYMBOL(chacha_is_arch_optimized); 58 - 59 53 static int __init riscv64_chacha_mod_init(void) 60 54 { 61 55 if (riscv_isa_extension_available(NULL, ZVKB) &&
-6
lib/crypto/s390/chacha-glue.c
··· 47 47 } 48 48 EXPORT_SYMBOL(chacha_crypt_arch); 49 49 50 - bool chacha_is_arch_optimized(void) 51 - { 52 - return cpu_has_vx(); 53 - } 54 - EXPORT_SYMBOL(chacha_is_arch_optimized); 55 - 56 50 MODULE_DESCRIPTION("ChaCha stream cipher (s390 optimized)"); 57 51 MODULE_LICENSE("GPL v2");
-6
lib/crypto/x86/chacha_glue.c
··· 160 160 } 161 161 EXPORT_SYMBOL(chacha_crypt_arch); 162 162 163 - bool chacha_is_arch_optimized(void) 164 - { 165 - return static_key_enabled(&chacha_use_simd); 166 - } 167 - EXPORT_SYMBOL(chacha_is_arch_optimized); 168 - 169 163 static int __init chacha_simd_mod_init(void) 170 164 { 171 165 if (!boot_cpu_has(X86_FEATURE_SSSE3))