Skip to contentSkip to conversation

perf bench messaging: Fix the formatting issue when printing.

PATCH New liujing 4 participants 4 messages Sep 22, 2025 – Sep 16 perf events

lore
Share & tools
lore

liujing

author
#0 lore raw

PATCH 1/1 perf bench messaging: Fix the formatting issue when printing.

The unsigned int type should use the %u format specifier when printing with printf or related functions.

---
 tools/perf/bench/sched-messaging.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/bench/sched-messaging.c +2 -2
index 93dcd9dba3d0..0a447f279d68 100644
@@ -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",
Signature · 1 line
2.27.0
reviewer
#1 lore raw

PATCH 1/1 perf bench messaging: Fix the formatting issue when printing.

From: liujing <[email protected]>

The unsigned int type should use the %u format specifier when printing with printf or related functions.

---
 tools/perf/bench/sched-messaging.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/bench/sched-messaging.c +2 -2
index 4fb6657fc826..c5c9a7a1d7db 100644
@@ -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",
Signature · 1 line
2.55.0.1032.g73a4cd73de-goog
#2 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines

From: liujing <[email protected]>

The unsigned int type should use the %u format specifier when printing with printf or related functions.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#3 lore raw
In reply to Ian Rogers
Quoted 7 lines · Ian Rogers

From: liujing <[email protected]>

The unsigned int type should use the %u format specifier when printing with printf or related functions.

s/Rogeres/Rogers/g

Applied,

- Arnaldo

Quoted 22 lines
---
 tools/perf/bench/sched-messaging.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/bench/sched-messaging.c +2 -2
index 4fb6657fc826..c5c9a7a1d7db 100644
@@ -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",
Signature · 1 line
2.55.0.1032.g73a4cd73de-goog