The report function is currently conditionalised on CONFIG_NET.
As it's only used by CONFIG_CRYPTO_USER, conditionalising on that
instead of CONFIG_NET makes more sense.
This gets rid of a rarely used code-path.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
        return __crypto_acomp_alg(crypto_acomp_tfm(tfm)->__crt_alg);
 }
 
-#ifdef CONFIG_NET
-static int crypto_acomp_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_acomp_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_acomp racomp;
 
 
        return nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(racomp), &racomp);
 }
-#else
-static int crypto_acomp_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_acomp_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_acomp_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_acomp_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_acomp_report_stat,
 #endif
 
        return 0;
 }
 
-#ifdef CONFIG_NET
-static int crypto_aead_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_aead_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_aead raead;
        struct aead_alg *aead = container_of(alg, struct aead_alg, base);
 
        return nla_put(skb, CRYPTOCFGA_REPORT_AEAD, sizeof(raead), &raead);
 }
-#else
-static int crypto_aead_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_aead_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_aead_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_aead_report_stat,
 #endif
 
        ahash->free(ahash);
 }
 
-#ifdef CONFIG_NET
-static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_ahash_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_hash rhash;
 
 
        return nla_put(skb, CRYPTOCFGA_REPORT_HASH, sizeof(rhash), &rhash);
 }
-#else
-static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_ahash_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_ahash_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_ahash_report_stat,
 #endif
 
 
 #include "internal.h"
 
-#ifdef CONFIG_NET
-static int crypto_akcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_akcipher_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_akcipher rakcipher;
 
        return nla_put(skb, CRYPTOCFGA_REPORT_AKCIPHER,
                       sizeof(rakcipher), &rakcipher);
 }
-#else
-static int crypto_akcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_akcipher_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_akcipher_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_akcipher_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_akcipher_report_stat,
 #endif
 
 
 #include "internal.h"
 
-#ifdef CONFIG_NET
-static int crypto_kpp_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_kpp_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_kpp rkpp;
 
 
        return nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(rkpp), &rkpp);
 }
-#else
-static int crypto_kpp_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_kpp_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_kpp_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_kpp_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_kpp_report_stat,
 #endif
 
        return ralg->seedsize;
 }
 
-#ifdef CONFIG_NET
-static int crypto_rng_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_rng_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_rng rrng;
 
 
        return nla_put(skb, CRYPTOCFGA_REPORT_RNG, sizeof(rrng), &rrng);
 }
-#else
-static int crypto_rng_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_rng_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_rng_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_rng_report_stat,
 #endif
 
 static int scomp_scratch_users;
 static DEFINE_MUTEX(scomp_lock);
 
-#ifdef CONFIG_NET
-static int crypto_scomp_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_scomp_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_comp rscomp;
 
        return nla_put(skb, CRYPTOCFGA_REPORT_COMPRESS,
                       sizeof(rscomp), &rscomp);
 }
-#else
-static int crypto_scomp_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_scomp_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_scomp_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_scomp_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_acomp_report_stat,
 #endif
 
        shash->free(shash);
 }
 
-#ifdef CONFIG_NET
-static int crypto_shash_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_shash_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct crypto_report_hash rhash;
        struct shash_alg *salg = __crypto_shash_alg(alg);
 
        return nla_put(skb, CRYPTOCFGA_REPORT_HASH, sizeof(rhash), &rhash);
 }
-#else
-static int crypto_shash_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static void crypto_shash_show(struct seq_file *m, struct crypto_alg *alg)
        __maybe_unused;
 #ifdef CONFIG_PROC_FS
        .show = crypto_shash_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_shash_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_shash_report_stat,
 #endif
 
        seq_printf(m, "walksize     : %u\n", skcipher->walksize);
 }
 
-#ifdef CONFIG_NET
-static int crypto_skcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
+static int __maybe_unused crypto_skcipher_report(
+       struct sk_buff *skb, struct crypto_alg *alg)
 {
        struct skcipher_alg *skcipher = __crypto_skcipher_alg(alg);
        struct crypto_report_blkcipher rblkcipher;
        return nla_put(skb, CRYPTOCFGA_REPORT_BLKCIPHER,
                       sizeof(rblkcipher), &rblkcipher);
 }
-#else
-static int crypto_skcipher_report(struct sk_buff *skb, struct crypto_alg *alg)
-{
-       return -ENOSYS;
-}
-#endif
 
 static int __maybe_unused crypto_skcipher_report_stat(
        struct sk_buff *skb, struct crypto_alg *alg)
 #ifdef CONFIG_PROC_FS
        .show = crypto_skcipher_show,
 #endif
+#ifdef CONFIG_CRYPTO_USER
        .report = crypto_skcipher_report,
+#endif
 #ifdef CONFIG_CRYPTO_STATS
        .report_stat = crypto_skcipher_report_stat,
 #endif