diff mbox series

[v2,2/8] selftests/cachestat: Fix print_cachestat format

Message ID de1b432982f099e7fac71f3915c5a879b7078cbe.1693829810.git.maciej.wieczor-retman@intel.com
State Accepted
Commit 3aa779a9d141f65adbe519653b6aee7188c49e27
Headers show
Series Add printf attribute to kselftest functions | expand

Commit Message

Maciej Wieczor-Retman Sept. 4, 2023, 12:44 p.m. UTC
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.

Acked-by: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Wieczor-Retman Maciej <maciej.wieczor-retman@intel.com>
---
Changelog v2:
- Added Acked-by tag (Nhat)

 tools/testing/selftests/cachestat/test_cachestat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/cachestat/test_cachestat.c b/tools/testing/selftests/cachestat/test_cachestat.c
index a5a4ac8dcb76..7f3871eef409 100644
--- a/tools/testing/selftests/cachestat/test_cachestat.c
+++ b/tools/testing/selftests/cachestat/test_cachestat.c
@@ -23,7 +23,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);
 }