All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] raid6test: Use str_plural() to fix Coccinelle warning
@ 2024-03-28 13:15 Thorsten Blum
  2024-04-12 21:29 ` [RESEND PATCH] " Thorsten Blum
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-03-28 13:15 UTC (permalink / raw)
  To: Dan Williams, Herbert Xu, David S. Miller
  Cc: linux-crypto, linux-kernel, Thorsten Blum

Fixes the following Coccinelle/coccicheck warning reported by
string_choices.cocci:

	opportunity for str_plural(err)

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 crypto/async_tx/raid6test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c
index d3fbee1e03e5..3826ccf0b9cc 100644
--- a/crypto/async_tx/raid6test.c
+++ b/crypto/async_tx/raid6test.c
@@ -11,6 +11,7 @@
 #include <linux/mm.h>
 #include <linux/random.h>
 #include <linux/module.h>
+#include <linux/string_choices.h>
 
 #undef pr
 #define pr(fmt, args...) pr_info("raid6test: " fmt, ##args)
@@ -228,7 +229,7 @@ static int __init raid6_test(void)
 
 	pr("\n");
 	pr("complete (%d tests, %d failure%s)\n",
-	   tests, err, err == 1 ? "" : "s");
+	   tests, err, str_plural(err));
 
 	for (i = 0; i < NDISKS+3; i++)
 		put_page(data[i]);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [RESEND PATCH] raid6test: Use str_plural() to fix Coccinelle warning
  2024-03-28 13:15 [PATCH] raid6test: Use str_plural() to fix Coccinelle warning Thorsten Blum
@ 2024-04-12 21:29 ` Thorsten Blum
  0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Blum @ 2024-04-12 21:29 UTC (permalink / raw)
  To: thorsten.blum; +Cc: dan.j.williams, davem, herbert, linux-crypto, linux-kernel

Fixes the following Coccinelle/coccicheck warning reported by
string_choices.cocci:

	opportunity for str_plural(err)

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 crypto/async_tx/raid6test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c
index d3fbee1e03e5..3826ccf0b9cc 100644
--- a/crypto/async_tx/raid6test.c
+++ b/crypto/async_tx/raid6test.c
@@ -11,6 +11,7 @@
 #include <linux/mm.h>
 #include <linux/random.h>
 #include <linux/module.h>
+#include <linux/string_choices.h>
 
 #undef pr
 #define pr(fmt, args...) pr_info("raid6test: " fmt, ##args)
@@ -228,7 +229,7 @@ static int __init raid6_test(void)
 
 	pr("\n");
 	pr("complete (%d tests, %d failure%s)\n",
-	   tests, err, err == 1 ? "" : "s");
+	   tests, err, str_plural(err));
 
 	for (i = 0; i < NDISKS+3; i++)
 		put_page(data[i]);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-12 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-28 13:15 [PATCH] raid6test: Use str_plural() to fix Coccinelle warning Thorsten Blum
2024-04-12 21:29 ` [RESEND PATCH] " Thorsten Blum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.