]> www.infradead.org Git - nvme.git/commitdiff
fgraph: Use str_plural() in test_graph_storage_single()
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Tue, 18 Jun 2024 07:20:14 +0000 (15:20 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 1 Jul 2024 23:57:51 +0000 (19:57 -0400)
Use existing str_plural() function rather than duplicating its
implementation.

./kernel/trace/trace_selftest.c:880:56-60: opportunity for str_plural(size).

Link: https://lore.kernel.org/linux-trace-kernel/20240618072014.20855-1-jiapeng.chong@linux.alibaba.com
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>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_selftest.c

index adf0f436d84bde15fa9cab4a92af87aaeef32ecb..97f1e4bc47dc864117b1da04ca902cf87e2728c6 100644 (file)
@@ -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) {