Skip to content

Commit 96dddb7

Browse files
Andre-ARMctmarinas
authored andcommitted
kselftest/arm64: mte: fix printf type warnings about longs
When checking MTE tags, we print some diagnostic messages when the tests fail. Some variables uses there are "longs", however we only use "%x" for the format specifier. Update the format specifiers to "%lx", to match the variable types they are supposed to print. Fixes: f3b2a26 ("kselftest/arm64: Verify mte tag inclusion via prctl") Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 4716f71 commit 96dddb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/arm64/mte/check_tags_inclusion.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int check_single_included_tags(int mem_type, int mode)
6565
ptr = mte_insert_tags(ptr, BUFFER_SIZE);
6666
/* Check tag value */
6767
if (MT_FETCH_TAG((uintptr_t)ptr) == tag) {
68-
ksft_print_msg("FAIL: wrong tag = 0x%x with include mask=0x%x\n",
68+
ksft_print_msg("FAIL: wrong tag = 0x%lx with include mask=0x%x\n",
6969
MT_FETCH_TAG((uintptr_t)ptr),
7070
MT_INCLUDE_VALID_TAG(tag));
7171
result = KSFT_FAIL;
@@ -97,7 +97,7 @@ static int check_multiple_included_tags(int mem_type, int mode)
9797
ptr = mte_insert_tags(ptr, BUFFER_SIZE);
9898
/* Check tag value */
9999
if (MT_FETCH_TAG((uintptr_t)ptr) < tag) {
100-
ksft_print_msg("FAIL: wrong tag = 0x%x with include mask=0x%x\n",
100+
ksft_print_msg("FAIL: wrong tag = 0x%lx with include mask=0x%lx\n",
101101
MT_FETCH_TAG((uintptr_t)ptr),
102102
MT_INCLUDE_VALID_TAGS(excl_mask));
103103
result = KSFT_FAIL;

0 commit comments

Comments
 (0)