crypto: api - Fix CRYPTO_USER checks for report function
authorOndrej Mosnacek <omosnace@redhat.com>
Tue, 2 May 2023 08:02:33 +0000 (10:02 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 2 May 2023 10:22:24 +0000 (18:22 +0800)
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: c0f9e01dd266 ("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>
crypto/acompress.c
crypto/aead.c
crypto/ahash.c
crypto/akcipher.c
crypto/kpp.c
crypto/rng.c
crypto/scompress.c
crypto/shash.c
crypto/skcipher.c

index 82a290df2822a0c5239af964e73bb5cbada3b79c..1c682810a484dcdf3368ef61197e6262926e75dd 100644 (file)
@@ -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
index ffc48a7dfb349bac46d4ca5831ea0f1900fdebd1..d5ba204ebdbfa6c5bf90ff87d9f3d55e637c741d 100644 (file)
@@ -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
index b8a607928e72d7ebb8f246017f2bd5b74e90ab81..32465104044651af4cbd3b918eaeff84ab8663e3 100644 (file)
@@ -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
index 186e762b509a6e7e5c0fd073ad03961107573672..7960ceb528c3664fb74968f57da9ba754281f324 100644 (file)
@@ -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
index 74f2e8e918fa5854e444ae858c604d2d52c6c97c..33d44e59387ff3370d4dd2a7f5ae036163aea39f 100644 (file)
@@ -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
index ffde0f64fb25934b5507841a83bdb13be9c24324..279dffdebf59815b5eccb59d69118c60a3be7205 100644 (file)
@@ -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
index 24138b42a648a2fe431c410aa5696daffa5a54a7..442a82c9de7def1f876045d6204da9733c9a5994 100644 (file)
@@ -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
index 5845b7d59b2f259ef0fa00475b8e805ebb5a0bb3..717b42df3495ed55a87e744da3153e898a380cf2 100644 (file)
@@ -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
index 6caca02d7e5527ef1559c1169b1caa498f1363f5..7b275716cf4e3a2c6e39fa3ef87ba22e98c7b1be 100644 (file)
@@ -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