aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools
diff options
context:
space:
mode:
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>2023-10-13 13:36:26 +0200
committerShuah Khan <skhan@linuxfoundation.org>2023-10-13 14:08:10 -0600
commit3aa779a9d141f65adbe519653b6aee7188c49e27 (patch)
tree088e4fa763692cef8675a58edce06c2603524787 /tools
parentselftests: Add printf attribute to kselftest prints (diff)
downloadwireguard-linux-3aa779a9d141f65adbe519653b6aee7188c49e27.tar.xz
wireguard-linux-3aa779a9d141f65adbe519653b6aee7188c49e27.zip
selftests/cachestat: Fix print_cachestat format
Compiling cachestat selftest after adding a __printf() attribute to ksft_print_msg() exposes a -Wformat warning in print_cachestat(). The format specifier in printf() call expects long int variables and received long long int. Change format specifiers to long long int so they match passed variables. Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> Acked-by: Nhat Pham <nphamcs@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/cachestat/test_cachestat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/cachestat/test_cachestat.c b/tools/testing/selftests/cachestat/test_cachestat.c
index 4804c7dc7b31..b171fd53b004 100644
--- a/tools/testing/selftests/cachestat/test_cachestat.c
+++ b/tools/testing/selftests/cachestat/test_cachestat.c
@@ -27,7 +27,7 @@ static const char * const dev_files[] = {
void print_cachestat(struct cachestat *cs)
{
ksft_print_msg(
- "Using cachestat: Cached: %lu, Dirty: %lu, Writeback: %lu, Evicted: %lu, Recently Evicted: %lu\n",
+ "Using cachestat: Cached: %llu, Dirty: %llu, Writeback: %llu, Evicted: %llu, Recently Evicted: %llu\n",
cs->nr_cache, cs->nr_dirty, cs->nr_writeback,
cs->nr_evicted, cs->nr_recently_evicted);
}