diff options
author | Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> | 2023-10-13 14:36:32 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-10-13 23:08:42 +0300 |
commit | 27c734f4402243f478348108d8a2ebd6e3e5e8a3 (patch) | |
tree | d3a2907101915ca5239a7dd1b8eb003636bfc429 /tools/testing/selftests/resctrl | |
parent | d3772e7badd2cd3813e2efba0034f6e39aecc97f (diff) | |
download | linux-27c734f4402243f478348108d8a2ebd6e3e5e8a3.tar.xz |
selftests/resctrl: Fix wrong format specifier
Compiling resctrl selftest after adding a __printf() attribute to
ksft_print_msg() exposes -Wformat warning in show_cache_info().
The format specifier used expects a variable of type int but a long
unsigned int variable is passed instead.
Change the format specifier to match the passed variable.
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/resctrl')
-rw-r--r-- | tools/testing/selftests/resctrl/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c index d3cbb829ff6a..a5d082cd2d53 100644 --- a/tools/testing/selftests/resctrl/cache.c +++ b/tools/testing/selftests/resctrl/cache.c @@ -294,7 +294,7 @@ int show_cache_info(unsigned long sum_llc_val, int no_of_bits, ret = platform && abs((int)diff_percent) > max_diff_percent && (cmt ? (abs(avg_diff) > max_diff) : true); - ksft_print_msg("%s Check cache miss rate within %d%%\n", + ksft_print_msg("%s Check cache miss rate within %lu%%\n", ret ? "Fail:" : "Pass:", max_diff_percent); ksft_print_msg("Percent diff=%d\n", abs((int)diff_percent)); |