]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: aead - use str_yes_no() helper in crypto_aead_show()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 11 Feb 2025 09:52:54 +0000 (10:52 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2025 07:56:03 +0000 (15:56 +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/aead.c

index cade532413bfcf293d5da4638e9acb7a0201000f..12f5b42171af35e23664e386de46727b8c184cb5 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 #include <linux/seq_file.h>
 #include <linux/string.h>
+#include <linux/string_choices.h>
 #include <net/netlink.h>
 
 #include "internal.h"
@@ -156,8 +157,8 @@ static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
        struct aead_alg *aead = container_of(alg, struct aead_alg, base);
 
        seq_printf(m, "type         : aead\n");
-       seq_printf(m, "async        : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
-                                            "yes" : "no");
+       seq_printf(m, "async        : %s\n",
+                  str_yes_no(alg->cra_flags & CRYPTO_ALG_ASYNC));
        seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
        seq_printf(m, "ivsize       : %u\n", aead->ivsize);
        seq_printf(m, "maxauthsize  : %u\n", aead->maxauthsize);