1

crypto: api - Fix CRYPTO_USER checks for report function

Checking the config via ifdef incorrectly compiles out the report
functions when CRYPTO_USER is set to =m. Fix it by using IS_ENABLED()
instead.

Fixes: c0f9e01dd2 ("crypto: api - Check CRYPTO_USER instead of NET for report")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Ondrej Mosnacek 2023-05-02 10:02:33 +02:00 committed by Herbert Xu
parent 4140aafcff
commit b8969a1b69
9 changed files with 9 additions and 9 deletions

View File

@ -125,7 +125,7 @@ static const struct crypto_type crypto_acomp_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_acomp_show, .show = crypto_acomp_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_acomp_report, .report = crypto_acomp_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -242,7 +242,7 @@ static const struct crypto_type crypto_aead_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_aead_show, .show = crypto_aead_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_aead_report, .report = crypto_aead_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -509,7 +509,7 @@ static const struct crypto_type crypto_ahash_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_ahash_show, .show = crypto_ahash_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_ahash_report, .report = crypto_ahash_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -98,7 +98,7 @@ static const struct crypto_type crypto_akcipher_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_akcipher_show, .show = crypto_akcipher_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_akcipher_report, .report = crypto_akcipher_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -96,7 +96,7 @@ static const struct crypto_type crypto_kpp_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_kpp_show, .show = crypto_kpp_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_kpp_report, .report = crypto_kpp_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -118,7 +118,7 @@ static const struct crypto_type crypto_rng_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_rng_show, .show = crypto_rng_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_rng_report, .report = crypto_rng_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -240,7 +240,7 @@ static const struct crypto_type crypto_scomp_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_scomp_show, .show = crypto_scomp_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_scomp_report, .report = crypto_scomp_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -548,7 +548,7 @@ static const struct crypto_type crypto_shash_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_shash_show, .show = crypto_shash_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_shash_report, .report = crypto_shash_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS

View File

@ -776,7 +776,7 @@ static const struct crypto_type crypto_skcipher_type = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
.show = crypto_skcipher_show, .show = crypto_skcipher_show,
#endif #endif
#ifdef CONFIG_CRYPTO_USER #if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_skcipher_report, .report = crypto_skcipher_report,
#endif #endif
#ifdef CONFIG_CRYPTO_STATS #ifdef CONFIG_CRYPTO_STATS