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

Ian Rogers 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 Ian Rogers 1 week, 2 days ago
From: liujing <liujing@cmss.chinamobile.com>

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>
Reviewed-by: Ian Rogeres <irogers@google.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 4fb6657fc826..c5c9a7a1d7db 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.55.0.1032.g73a4cd73de-goog
Re: [PATCH] perf bench messaging: Fix the formatting issue when printing.
Posted by Arnaldo Carvalho de Melo 1 week, 1 day ago
On Tue, Sep 15, 2026 at 03:11:22PM -0700, Ian Rogers wrote:
> From: liujing <liujing@cmss.chinamobile.com>
> 
> 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>
> Reviewed-by: Ian Rogeres <irogers@google.com>

s/Rogeres/Rogers/g

Applied,

- Arnaldo

> ---
>  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 4fb6657fc826..c5c9a7a1d7db 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.55.0.1032.g73a4cd73de-goog