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: aead - use str_yes_no() helper in crypto_aead_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
844c683d 4f95a6d2

+3 -2
+3 -2
crypto/aead.c
··· 16 16 #include <linux/slab.h> 17 17 #include <linux/seq_file.h> 18 18 #include <linux/string.h> 19 + #include <linux/string_choices.h> 19 20 #include <net/netlink.h> 20 21 21 22 #include "internal.h" ··· 157 156 struct aead_alg *aead = container_of(alg, struct aead_alg, base); 158 157 159 158 seq_printf(m, "type : aead\n"); 160 - seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ? 161 - "yes" : "no"); 159 + seq_printf(m, "async : %s\n", 160 + str_yes_no(alg->cra_flags & CRYPTO_ALG_ASYNC)); 162 161 seq_printf(m, "blocksize : %u\n", alg->cra_blocksize); 163 162 seq_printf(m, "ivsize : %u\n", aead->ivsize); 164 163 seq_printf(m, "maxauthsize : %u\n", aead->maxauthsize);