[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241121113421.4817-1-liujing@cmss.chinamobile.com>
Date: Thu, 21 Nov 2024 19:34:21 +0800
From: liujing <liujing@...s.chinamobile.com>
To: peterz@...radead.org,
mingo@...hat.com,
acme@...nel.org,
namhyung@...nel.org,
mark.rutland@....com,
alexander.shishkin@...ux.intel.com,
jolsa@...nel.org,
irogers@...gle.com,
adrian.hunter@...el.com,
kan.liang@...ux.intel.com
Cc: linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org,
liujing <liujing@...s.chinamobile.com>
Subject: [PATCH] perf bench: Fix the wrong format specifier
These three variables inner_iterations, iterations, set_bits,
and num_bits have the type of unsigned int, so the output should be in the format of %u.
Signed-off-by: liujing <liujing@...s.chinamobile.com>
diff --git a/tools/perf/bench/find-bit-bench.c b/tools/perf/bench/find-bit-bench.c
index 7e25b0e413f6..06edfd463eb2 100644
--- a/tools/perf/bench/find-bit-bench.c
+++ b/tools/perf/bench/find-bit-bench.c
@@ -104,7 +104,7 @@ static int do_for_each_set_bit(unsigned int num_bits)
update_stats(&tb_time_stats, runtime_us);
}
- printf("%d operations %d bits set of %d bits\n",
+ printf("%u operations %u bits set of %u bits\n",
inner_iterations, set_bits, num_bits);
time_average = avg_stats(&fb_time_stats);
time_stddev = stddev_stats(&fb_time_stats);
--
2.27.0
Powered by blists - more mailing lists