]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: api - remove unnecessary forward declarations
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 22 Dec 2025 10:44:55 +0000 (11:44 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 23 Jan 2026 05:48:43 +0000 (13:48 +0800)
Add the __maybe_unused attribute to the function definitions and remove
the now-unnecessary forward declarations.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
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/shash.c
crypto/skcipher.c

index b353615fe2652faa21c182860ae3e29587a338df..bbd210912f93d8fc9bf2a7f5152bae9fa247e882 100644 (file)
@@ -60,10 +60,8 @@ static int __maybe_unused crypto_acomp_report(
        return nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, sizeof(racomp), &racomp);
 }
 
-static void crypto_acomp_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-
-static void crypto_acomp_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_acomp_show(struct seq_file *m,
+                                            struct crypto_alg *alg)
 {
        seq_puts(m, "type         : acomp\n");
 }
index 08d44c5e5c336687ab29caa8aaa84bd6c0f19335..e009937bf3a5d946e1de31257131940b2bc636fe 100644 (file)
@@ -151,9 +151,8 @@ static int __maybe_unused crypto_aead_report(
        return nla_put(skb, CRYPTOCFGA_REPORT_AEAD, sizeof(raead), &raead);
 }
 
-static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_aead_show(struct seq_file *m,
+                                           struct crypto_alg *alg)
 {
        struct aead_alg *aead = container_of(alg, struct aead_alg, base);
 
index c563a68dc000c8d388e2f9de5cd6a95db41ab3d1..7a730324c50e2858a44f99affa03100936dca862 100644 (file)
@@ -801,9 +801,8 @@ static int __maybe_unused crypto_ahash_report(
        return nla_put(skb, CRYPTOCFGA_REPORT_HASH, sizeof(rhash), &rhash);
 }
 
-static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_ahash_show(struct seq_file *m,
+                                            struct crypto_alg *alg)
 {
        seq_printf(m, "type         : ahash\n");
        seq_printf(m, "async        : %s\n",
index a36f50c8382787f126051de52f4771a15ff297a5..dfe87b3ce1837791258cb351a68368b305021a01 100644 (file)
@@ -46,10 +46,8 @@ static int __maybe_unused crypto_akcipher_report(
                       sizeof(rakcipher), &rakcipher);
 }
 
-static void crypto_akcipher_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-
-static void crypto_akcipher_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_akcipher_show(struct seq_file *m,
+                                               struct crypto_alg *alg)
 {
        seq_puts(m, "type         : akcipher\n");
 }
index 2e0cefe7a25f5430f0916e215e2a6fb22b335ecd..7451d39a7ad8b380b660440600d5b98fcba0ed15 100644 (file)
@@ -29,10 +29,8 @@ static int __maybe_unused crypto_kpp_report(
        return nla_put(skb, CRYPTOCFGA_REPORT_KPP, sizeof(rkpp), &rkpp);
 }
 
-static void crypto_kpp_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-
-static void crypto_kpp_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_kpp_show(struct seq_file *m,
+                                          struct crypto_alg *alg)
 {
        seq_puts(m, "type         : kpp\n");
 }
index ee1768c5a4005b0a888c4dafe6da33fb6ef14d6b..5982dcea1010b2f09c3a6240b4db3eb5f2119e69 100644 (file)
@@ -77,9 +77,8 @@ static int __maybe_unused crypto_rng_report(
        return nla_put(skb, CRYPTOCFGA_REPORT_RNG, sizeof(rrng), &rrng);
 }
 
-static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_rng_show(struct seq_file *m,
+                                          struct crypto_alg *alg)
 {
        seq_printf(m, "type         : rng\n");
        seq_printf(m, "seedsize     : %u\n", seedsize(alg));
index 5238e0def4fd2128e2c9c2ad7ee36aa367f1ae24..2f07d0bd1f61b62e14941316061b4bae866c9322 100644 (file)
@@ -346,9 +346,8 @@ static int __maybe_unused crypto_shash_report(
        return nla_put(skb, CRYPTOCFGA_REPORT_HASH, sizeof(rhash), &rhash);
 }
 
-static void crypto_shash_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-static void crypto_shash_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_shash_show(struct seq_file *m,
+                                            struct crypto_alg *alg)
 {
        struct shash_alg *salg = __crypto_shash_alg(alg);
 
index 09f1ba82f99aa33fe391830d8f6e6fda2adaa883..2b31d1d5d268b491259712c393369c921eee271b 100644 (file)
@@ -570,9 +570,8 @@ static void crypto_skcipher_free_instance(struct crypto_instance *inst)
        skcipher->free(skcipher);
 }
 
-static void crypto_skcipher_show(struct seq_file *m, struct crypto_alg *alg)
-       __maybe_unused;
-static void crypto_skcipher_show(struct seq_file *m, struct crypto_alg *alg)
+static void __maybe_unused crypto_skcipher_show(struct seq_file *m,
+                                               struct crypto_alg *alg)
 {
        struct skcipher_alg *skcipher = __crypto_skcipher_alg(alg);