Skip to content

Commit 27c734f

Browse files
maciejwieczorretmanshuahkh
authored andcommitted
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>
1 parent d3772e7 commit 27c734f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • tools/testing/selftests/resctrl

tools/testing/selftests/resctrl/cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ int show_cache_info(unsigned long sum_llc_val, int no_of_bits,
294294
ret = platform && abs((int)diff_percent) > max_diff_percent &&
295295
(cmt ? (abs(avg_diff) > max_diff) : true);
296296

297-
ksft_print_msg("%s Check cache miss rate within %d%%\n",
297+
ksft_print_msg("%s Check cache miss rate within %lu%%\n",
298298
ret ? "Fail:" : "Pass:", max_diff_percent);
299299

300300
ksft_print_msg("Percent diff=%d\n", abs((int)diff_percent));

0 commit comments

Comments
 (0)