crypto: skcipher - use str_yes_no() helper in crypto_skcipher_show()
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 17 Jan 2025 14:42:22 +0000 (15:42 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 9 Feb 2025 10:08:11 +0000 (18:08 +0800)
Remove hard-coded strings by using the str_yes_no() helper function.

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

index a9eb2dcf289821e559707324231e24d067a8d4ec..e3751cc88b76edb9033478799616127d4f3a2daf 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/seq_file.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/string_choices.h>
 #include <net/netlink.h>
 #include "skcipher.h"
 
@@ -612,7 +613,7 @@ static void crypto_skcipher_show(struct seq_file *m, struct crypto_alg *alg)
 
        seq_printf(m, "type         : skcipher\n");
        seq_printf(m, "async        : %s\n",
-                  alg->cra_flags & CRYPTO_ALG_ASYNC ?  "yes" : "no");
+                  str_yes_no(alg->cra_flags & CRYPTO_ALG_ASYNC));
        seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
        seq_printf(m, "min keysize  : %u\n", skcipher->min_keysize);
        seq_printf(m, "max keysize  : %u\n", skcipher->max_keysize);