Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: ahash - use str_yes_no() helper in crypto_ahash_show()

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>

authored by

Thorsten Blum and committed by
Herbert Xu
77cb2f63 ea6f861a

+3 -2
+3 -2
crypto/ahash.c
··· 21 21 #include <linux/slab.h> 22 22 #include <linux/seq_file.h> 23 23 #include <linux/string.h> 24 + #include <linux/string_choices.h> 24 25 #include <net/netlink.h> 25 26 26 27 #include "hash.h" ··· 537 536 static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg) 538 537 { 539 538 seq_printf(m, "type : ahash\n"); 540 - seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ? 541 - "yes" : "no"); 539 + seq_printf(m, "async : %s\n", 540 + str_yes_no(alg->cra_flags & CRYPTO_ALG_ASYNC)); 542 541 seq_printf(m, "blocksize : %u\n", alg->cra_blocksize); 543 542 seq_printf(m, "digestsize : %u\n", 544 543 __crypto_hash_alg_common(alg)->digestsize);