Skip to contentSkip to conversation

crypto: skcipher - use str_yes_no() helper in crypto_skcipher_show()

PATCH In review Thorsten Blum 2 participants 2 messages Jan 17, 2025 – Feb 9, 2025 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: skcipher - use str_yes_no() helper in crypto_skcipher_show()

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

---
 crypto/skcipher.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
crypto/skcipher.c +2 -1
index a9eb2dcf2898..e3751cc88b76 100644
@@ -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);
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/skcipher.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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