Skip to content

Commit 844c683

Browse files
tobluxherbertx
authored andcommitted
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 4f95a6d commit 844c683

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crypto/aead.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/slab.h>
1717
#include <linux/seq_file.h>
1818
#include <linux/string.h>
19+
#include <linux/string_choices.h>
1920
#include <net/netlink.h>
2021

2122
#include "internal.h"
@@ -156,8 +157,8 @@ static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
156157
struct aead_alg *aead = container_of(alg, struct aead_alg, base);
157158

158159
seq_printf(m, "type : aead\n");
159-
seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
160-
"yes" : "no");
160+
seq_printf(m, "async : %s\n",
161+
str_yes_no(alg->cra_flags & CRYPTO_ALG_ASYNC));
161162
seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
162163
seq_printf(m, "ivsize : %u\n", aead->ivsize);
163164
seq_printf(m, "maxauthsize : %u\n", aead->maxauthsize);

0 commit comments

Comments
 (0)