mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
kselftest/arm64: mte: fix printf type warnings about pointers
When printing the value of a pointer, we should not use an integer format specifier, but the dedicated "%p" instead. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20240816153251.2833702-8-andre.przywara@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
7e893dc81d
commit
4716f71920
|
|
@ -91,7 +91,7 @@ static int check_buffer_underflow_by_byte(int mem_type, int mode,
|
|||
for (j = 0; j < sizes[i]; j++) {
|
||||
if (ptr[j] != '1') {
|
||||
err = true;
|
||||
ksft_print_msg("Buffer is not filled at index:%d of ptr:0x%lx\n",
|
||||
ksft_print_msg("Buffer is not filled at index:%d of ptr:0x%p\n",
|
||||
j, ptr);
|
||||
break;
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ static int check_buffer_overflow_by_byte(int mem_type, int mode,
|
|||
for (j = 0; j < sizes[i]; j++) {
|
||||
if (ptr[j] != '1') {
|
||||
err = true;
|
||||
ksft_print_msg("Buffer is not filled at index:%d of ptr:0x%lx\n",
|
||||
ksft_print_msg("Buffer is not filled at index:%d of ptr:0x%p\n",
|
||||
j, ptr);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void *mte_insert_tags(void *ptr, size_t size)
|
|||
int align_size;
|
||||
|
||||
if (!ptr || (unsigned long)(ptr) & MT_ALIGN_GRANULE) {
|
||||
ksft_print_msg("FAIL: Addr=%lx: invalid\n", ptr);
|
||||
ksft_print_msg("FAIL: Addr=%p: invalid\n", ptr);
|
||||
return NULL;
|
||||
}
|
||||
align_size = MT_ALIGN_UP(size);
|
||||
|
|
@ -112,7 +112,7 @@ void *mte_insert_tags(void *ptr, size_t size)
|
|||
void mte_clear_tags(void *ptr, size_t size)
|
||||
{
|
||||
if (!ptr || (unsigned long)(ptr) & MT_ALIGN_GRANULE) {
|
||||
ksft_print_msg("FAIL: Addr=%lx: invalid\n", ptr);
|
||||
ksft_print_msg("FAIL: Addr=%p: invalid\n", ptr);
|
||||
return;
|
||||
}
|
||||
size = MT_ALIGN_UP(size);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user