Skip to contentSkip to conversation

crypto: aead - use str_yes_no() helper in crypto_aead_show()

PATCH In review Thorsten Blum 2 participants 2 messages Feb 11, 2025 – Feb 21, 2025 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: aead - use str_yes_no() helper in crypto_aead_show()

Remove hard-coded strings by using the str_yes_no() helper function.

---
 crypto/aead.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
crypto/aead.c +3 -2
index cade532413bf..12f5b42171af 100644
@@ -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);
Signature · 1 line
2.48.0
maintainer
#1 lore raw
Quoted 6 lines · Thorsten Blum

Remove hard-coded strings by using the str_yes_no() helper function.

---
 crypto/aead.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt