Skip to contentSkip to conversation

crypto: proc - Use str_yes_no() and str_no_yes() helpers

PATCH In review Thorsten Blum 2 participants 2 messages Dec 30, 2024 – Jan 14, 2025 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: proc - Use str_yes_no() and str_no_yes() helpers

Remove hard-coded strings by using the str_yes_no() and str_no_yes() helpers. Remove unnecessary curly braces.

---
 crypto/proc.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
crypto/proc.c +3 -6
index 56c7c78df297..522b27d90d29 100644
@@ -47,13 +47,10 @@ static int c_show(struct seq_file *m, void *p)
 		   (alg->cra_flags & CRYPTO_ALG_TESTED) ?
 		   "passed" : "unknown");
 	seq_printf(m, "internal     : %s\n",
-		   (alg->cra_flags & CRYPTO_ALG_INTERNAL) ?
-		   "yes" : "no");
-	if (fips_enabled) {
+		   str_yes_no(alg->cra_flags & CRYPTO_ALG_INTERNAL));
+	if (fips_enabled)
 		seq_printf(m, "fips         : %s\n",
-			   (alg->cra_flags & CRYPTO_ALG_FIPS_INTERNAL) ?
-			   "no" : "yes");
-	}
+			str_no_yes(alg->cra_flags & CRYPTO_ALG_FIPS_INTERNAL));
 
 	if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
 		seq_printf(m, "type         : larval\n");
Signature · 1 line
2.47.1
maintainer
#1 lore raw
Quoted 7 lines · Thorsten Blum

Remove hard-coded strings by using the str_yes_no() and str_no_yes() helpers. Remove unnecessary curly braces.

---
 crypto/proc.c | 9 +++------
 1 file changed, 3 insertions(+), 6 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