summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/mm/mremap_test.c
diff options
context:
space:
mode:
authorMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>2023-10-13 14:36:31 +0300
committerShuah Khan <skhan@linuxfoundation.org>2023-10-13 23:08:36 +0300
commitd3772e7badd2cd3813e2efba0034f6e39aecc97f (patch)
tree10bba2cf7e5e75b1bd821458488f3eb6c37ed55d /tools/testing/selftests/mm/mremap_test.c
parent07bd3c38809216e2c32bd479fd489143e72deb1f (diff)
downloadlinux-d3772e7badd2cd3813e2efba0034f6e39aecc97f.tar.xz
selftests/mm: Substitute attribute with a macro
Compiling mm selftest after adding a __printf() attribute to ksft_print_msg() exposes -Wformat warning in remap_region(). Fix the wrong format specifier causing the warning. The mm selftest uses the printf attribute in its full form. Since the header file that uses it also includes kselftests.h it can use the macro defined there. Use __printf() included with kselftests.h instead of the full attribute. Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/mm/mremap_test.c')
-rw-r--r--tools/testing/selftests/mm/mremap_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
index 5c3773de9f0f..1dbfcf6df255 100644
--- a/tools/testing/selftests/mm/mremap_test.c
+++ b/tools/testing/selftests/mm/mremap_test.c
@@ -338,7 +338,7 @@ static long long remap_region(struct config c, unsigned int threshold_mb,
char c = (char) rand();
if (((char *) dest_addr)[i] != c) {
- ksft_print_msg("Data after remap doesn't match at offset %d\n",
+ ksft_print_msg("Data after remap doesn't match at offset %llu\n",
i);
ksft_print_msg("Expected: %#x\t Got: %#x\n", c & 0xff,
((char *) dest_addr)[i] & 0xff);