Skip to content

Commit

Permalink
crypto: api - Fix CRYPTO_USER checks for report function
Browse files Browse the repository at this point in the history
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: c0f9e01 ("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>
  • Loading branch information
Ondrej Mosnacek authored and Herbert Xu committed May 2, 2023
1 parent 4140aaf commit b8969a1
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crypto/acompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static const struct crypto_type crypto_acomp_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_acomp_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_acomp_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/aead.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static const struct crypto_type crypto_aead_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_aead_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_aead_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/ahash.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static const struct crypto_type crypto_ahash_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_ahash_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_ahash_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/akcipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static const struct crypto_type crypto_akcipher_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_akcipher_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_akcipher_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/kpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static const struct crypto_type crypto_kpp_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_kpp_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_kpp_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static const struct crypto_type crypto_rng_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_rng_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_rng_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/scompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static const struct crypto_type crypto_scomp_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_scomp_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_scomp_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/shash.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ static const struct crypto_type crypto_shash_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_shash_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_shash_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down
2 changes: 1 addition & 1 deletion crypto/skcipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ static const struct crypto_type crypto_skcipher_type = {
#ifdef CONFIG_PROC_FS
.show = crypto_skcipher_show,
#endif
#ifdef CONFIG_CRYPTO_USER
#if IS_ENABLED(CONFIG_CRYPTO_USER)
.report = crypto_skcipher_report,
#endif
#ifdef CONFIG_CRYPTO_STATS
Expand Down

0 comments on commit b8969a1

Please sign in to comment.