diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2024-05-21 10:54:50 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-05-31 17:34:56 +0800 |
commit | f9110822fca5b92daefc2bfae4cfcda7dcfb03c9 (patch) | |
tree | 3589cc412455d573538a22288277250b92ab84a6 /crypto/internal.h | |
parent | b42519dbba838c928e82b55f32712fbe3eed2c45 (diff) | |
download | lwn-f9110822fca5b92daefc2bfae4cfcda7dcfb03c9.tar.gz lwn-f9110822fca5b92daefc2bfae4cfcda7dcfb03c9.zip |
crypto: api - Disable boot-test-finished if algapi is a module
The boot-test-finished toggle is only necessary if algapi
is built into the kernel. Do not include this code if it is a module.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/internal.h')
-rw-r--r-- | crypto/internal.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index 63e59240d5fb..aee31319be2e 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -66,7 +66,8 @@ extern struct blocking_notifier_head crypto_chain; int alg_test(const char *driver, const char *alg, u32 type, u32 mask); -#ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS +#if !IS_BUILTIN(CONFIG_CRYPTO_ALGAPI) || \ + IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) static inline bool crypto_boot_test_finished(void) { return true; @@ -84,7 +85,9 @@ static inline void set_crypto_boot_test_finished(void) { static_branch_enable(&__crypto_boot_test_finished); } -#endif /* !CONFIG_CRYPTO_MANAGER_DISABLE_TESTS */ +#endif /* !IS_BUILTIN(CONFIG_CRYPTO_ALGAPI) || + * IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) + */ #ifdef CONFIG_PROC_FS void __init crypto_init_proc(void); |