Skip to content

Commit 29b0075

Browse files
sean-jcoupton
authored andcommitted
KVM: selftests: Fix __GUEST_ASSERT() format warnings in ARM's arch timer test
Use %x instead of %lx when printing uint32_t variables to fix format warnings in ARM's arch timer test. aarch64/arch_timer.c: In function ‘guest_run_stage’: aarch64/arch_timer.c:138:33: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=] 138 | "config_iter + 1 = 0x%lx, irq_iter = 0x%lx.\n" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...... 141 | config_iter + 1, irq_iter); | ~~~~~~~~~~~~~~~ | | | uint32_t {aka unsigned int} Fixes: d1dafd0 ("KVM: arm64: selftests: Enable tuning of error margin in arch_timer test") Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20240314175116.2366301-1-seanjc@google.com Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent f5fe0ad commit 29b0075

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/kvm/aarch64/arch_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static void guest_run_stage(struct test_vcpu_shared_data *shared_data,
135135

136136
irq_iter = READ_ONCE(shared_data->nr_iter);
137137
__GUEST_ASSERT(config_iter + 1 == irq_iter,
138-
"config_iter + 1 = 0x%lx, irq_iter = 0x%lx.\n"
138+
"config_iter + 1 = 0x%x, irq_iter = 0x%x.\n"
139139
" Guest timer interrupt was not trigged within the specified\n"
140140
" interval, try to increase the error margin by [-e] option.\n",
141141
config_iter + 1, irq_iter);

0 commit comments

Comments
 (0)