Skip to content

Commit b8969a1

Browse files
WOnder93herbertx
authored andcommitted
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: 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>
1 parent 4140aaf commit b8969a1

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

crypto/acompress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static const struct crypto_type crypto_acomp_type = {
125125
#ifdef CONFIG_PROC_FS
126126
.show = crypto_acomp_show,
127127
#endif
128-
#ifdef CONFIG_CRYPTO_USER
128+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
129129
.report = crypto_acomp_report,
130130
#endif
131131
#ifdef CONFIG_CRYPTO_STATS

crypto/aead.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static const struct crypto_type crypto_aead_type = {
242242
#ifdef CONFIG_PROC_FS
243243
.show = crypto_aead_show,
244244
#endif
245-
#ifdef CONFIG_CRYPTO_USER
245+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
246246
.report = crypto_aead_report,
247247
#endif
248248
#ifdef CONFIG_CRYPTO_STATS

crypto/ahash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static const struct crypto_type crypto_ahash_type = {
509509
#ifdef CONFIG_PROC_FS
510510
.show = crypto_ahash_show,
511511
#endif
512-
#ifdef CONFIG_CRYPTO_USER
512+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
513513
.report = crypto_ahash_report,
514514
#endif
515515
#ifdef CONFIG_CRYPTO_STATS

crypto/akcipher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static const struct crypto_type crypto_akcipher_type = {
9898
#ifdef CONFIG_PROC_FS
9999
.show = crypto_akcipher_show,
100100
#endif
101-
#ifdef CONFIG_CRYPTO_USER
101+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
102102
.report = crypto_akcipher_report,
103103
#endif
104104
#ifdef CONFIG_CRYPTO_STATS

crypto/kpp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static const struct crypto_type crypto_kpp_type = {
9696
#ifdef CONFIG_PROC_FS
9797
.show = crypto_kpp_show,
9898
#endif
99-
#ifdef CONFIG_CRYPTO_USER
99+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
100100
.report = crypto_kpp_report,
101101
#endif
102102
#ifdef CONFIG_CRYPTO_STATS

crypto/rng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static const struct crypto_type crypto_rng_type = {
118118
#ifdef CONFIG_PROC_FS
119119
.show = crypto_rng_show,
120120
#endif
121-
#ifdef CONFIG_CRYPTO_USER
121+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
122122
.report = crypto_rng_report,
123123
#endif
124124
#ifdef CONFIG_CRYPTO_STATS

crypto/scompress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static const struct crypto_type crypto_scomp_type = {
240240
#ifdef CONFIG_PROC_FS
241241
.show = crypto_scomp_show,
242242
#endif
243-
#ifdef CONFIG_CRYPTO_USER
243+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
244244
.report = crypto_scomp_report,
245245
#endif
246246
#ifdef CONFIG_CRYPTO_STATS

crypto/shash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static const struct crypto_type crypto_shash_type = {
548548
#ifdef CONFIG_PROC_FS
549549
.show = crypto_shash_show,
550550
#endif
551-
#ifdef CONFIG_CRYPTO_USER
551+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
552552
.report = crypto_shash_report,
553553
#endif
554554
#ifdef CONFIG_CRYPTO_STATS

crypto/skcipher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ static const struct crypto_type crypto_skcipher_type = {
776776
#ifdef CONFIG_PROC_FS
777777
.show = crypto_skcipher_show,
778778
#endif
779-
#ifdef CONFIG_CRYPTO_USER
779+
#if IS_ENABLED(CONFIG_CRYPTO_USER)
780780
.report = crypto_skcipher_report,
781781
#endif
782782
#ifdef CONFIG_CRYPTO_STATS

0 commit comments

Comments
 (0)