[PATCH] perf bench messaging: Fix the formatting issue when printing.

liujing posted 1 patch 1 week, 2 days ago
tools/perf/bench/sched-messaging.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] perf bench messaging: Fix the formatting issue when printing.
Posted by liujing 1 week, 2 days ago
The unsigned int type should use the %u format specifier when
printing with printf or related functions.

Signed-off-by: liujing <liujing@cmss.chinamobile.com>
---
 tools/perf/bench/sched-messaging.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/bench/sched-messaging.c b/tools/perf/bench/sched-messaging.c
index 93dcd9dba3d0..0a447f279d68 100644
--- a/tools/perf/bench/sched-messaging.c
+++ b/tools/perf/bench/sched-messaging.c
@@ -338,9 +338,9 @@ int bench_sched_messaging(int argc, const char **argv)
 
 	switch (bench_format) {
 	case BENCH_FORMAT_DEFAULT:
-		printf("# %d sender and receiver %s per group\n",
+		printf("# %u sender and receiver %s per group\n",
 		       num_fds, thread_mode ? "threads" : "processes");
-		printf("# %d groups == %d %s run\n\n",
+		printf("# %u groups == %u %s run\n\n",
 		       num_groups, num_groups * 2 * num_fds,
 		       thread_mode ? "threads" : "processes");
 		printf(" %14s: %lu.%03lu [sec]\n", "Total time",
-- 
2.27.0