]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
crypto: proc - Use str_yes_no() and str_no_yes() helpers
authorThorsten Blum <thorsten.blum@linux.dev>
Mon, 30 Dec 2024 11:36:54 +0000 (12:36 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Jan 2025 03:31:13 +0000 (11:31 +0800)
Remove hard-coded strings by using the str_yes_no() and str_no_yes()
helpers. Remove unnecessary curly braces.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/proc.c

index 56c7c78df29713e301d6aee4082d62e867a83c64..522b27d90d297a80cc813fe0ef79f79e71272346 100644 (file)
@@ -47,13 +47,10 @@ static int c_show(struct seq_file *m, void *p)
                   (alg->cra_flags & CRYPTO_ALG_TESTED) ?
                   "passed" : "unknown");
        seq_printf(m, "internal     : %s\n",
-                  (alg->cra_flags & CRYPTO_ALG_INTERNAL) ?
-                  "yes" : "no");
-       if (fips_enabled) {
+                  str_yes_no(alg->cra_flags & CRYPTO_ALG_INTERNAL));
+       if (fips_enabled)
                seq_printf(m, "fips         : %s\n",
-                          (alg->cra_flags & CRYPTO_ALG_FIPS_INTERNAL) ?
-                          "no" : "yes");
-       }
+                       str_no_yes(alg->cra_flags & CRYPTO_ALG_FIPS_INTERNAL));
 
        if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
                seq_printf(m, "type         : larval\n");