* [PATCH] fgraph: Use str_plural() in test_graph_storage_single()
@ 2024-06-18 7:20 Jiapeng Chong
2024-06-19 13:43 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2024-06-18 7:20 UTC (permalink / raw)
To: rostedt
Cc: mhiramat, mathieu.desnoyers, linux-kernel, linux-trace-kernel,
Jiapeng Chong, Abaci Robot
Use existing str_plural() function rather than duplicating its
implementation.
./kernel/trace/trace_selftest.c:880:56-60: opportunity for str_plural(size).
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9349
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
kernel/trace/trace_selftest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index adf0f436d84b..97f1e4bc47dc 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -877,7 +877,7 @@ static int __init test_graph_storage_single(struct fgraph_fixture *fixture)
int ret;
pr_cont("PASSED\n");
- pr_info("Testing fgraph storage of %d byte%s: ", size, size > 1 ? "s" : "");
+ pr_info("Testing fgraph storage of %d byte%s: ", size, str_plural(size));
ret = init_fgraph_fixture(fixture);
if (ret && ret != -ENODEV) {
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] fgraph: Use str_plural() in test_graph_storage_single()
2024-06-18 7:20 [PATCH] fgraph: Use str_plural() in test_graph_storage_single() Jiapeng Chong
@ 2024-06-19 13:43 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2024-06-19 13:43 UTC (permalink / raw)
To: Jiapeng Chong
Cc: rostedt, mhiramat, mathieu.desnoyers, linux-kernel,
linux-trace-kernel, Abaci Robot
On Tue, 18 Jun 2024 15:20:14 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> Use existing str_plural() function rather than duplicating its
> implementation.
>
> ./kernel/trace/trace_selftest.c:880:56-60: opportunity for str_plural(size).
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9349
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Thanks, this looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> ---
> kernel/trace/trace_selftest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
> index adf0f436d84b..97f1e4bc47dc 100644
> --- a/kernel/trace/trace_selftest.c
> +++ b/kernel/trace/trace_selftest.c
> @@ -877,7 +877,7 @@ static int __init test_graph_storage_single(struct fgraph_fixture *fixture)
> int ret;
>
> pr_cont("PASSED\n");
> - pr_info("Testing fgraph storage of %d byte%s: ", size, size > 1 ? "s" : "");
> + pr_info("Testing fgraph storage of %d byte%s: ", size, str_plural(size));
>
> ret = init_fgraph_fixture(fixture);
> if (ret && ret != -ENODEV) {
> --
> 2.20.1.7.g153144c
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-19 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-18 7:20 [PATCH] fgraph: Use str_plural() in test_graph_storage_single() Jiapeng Chong
2024-06-19 13:43 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).