* [PATCH] KVM: selftests: Fix __GUEST_ASSERT() format warnings in ARM's arch timer test
@ 2024-03-14 17:51 Sean Christopherson
2024-03-26 13:50 ` Oliver Upton
0 siblings, 1 reply; 2+ messages in thread
From: Sean Christopherson @ 2024-03-14 17:51 UTC (permalink / raw)
To: Marc Zyngier, Oliver Upton
Cc: linux-arm-kernel, kvmarm, linux-kernel, Sean Christopherson
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: d1dafd065a23 ("KVM: arm64: selftests: Enable tuning of error margin in arch_timer test")
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
2024 Whack-a-Mole Champion.
Note, this is based on kvm/queue and probably won't apply to your tree as
the buggy commit went in via the RISC-V pull request.
tools/testing/selftests/kvm/aarch64/arch_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/aarch64/arch_timer.c b/tools/testing/selftests/kvm/aarch64/arch_timer.c
index ddba2c2fb5de..93100b3f1312 100644
--- a/tools/testing/selftests/kvm/aarch64/arch_timer.c
+++ b/tools/testing/selftests/kvm/aarch64/arch_timer.c
@@ -135,7 +135,7 @@ static void guest_run_stage(struct test_vcpu_shared_data *shared_data,
irq_iter = READ_ONCE(shared_data->nr_iter);
__GUEST_ASSERT(config_iter + 1 == irq_iter,
- "config_iter + 1 = 0x%lx, irq_iter = 0x%lx.\n"
+ "config_iter + 1 = 0x%x, irq_iter = 0x%x.\n"
" Guest timer interrupt was not trigged within the specified\n"
" interval, try to increase the error margin by [-e] option.\n",
config_iter + 1, irq_iter);
base-commit: e9a2bba476c8332ed547fce485c158d03b0b9659
--
2.44.0.291.gc1ea87d7ee-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] KVM: selftests: Fix __GUEST_ASSERT() format warnings in ARM's arch timer test
2024-03-14 17:51 [PATCH] KVM: selftests: Fix __GUEST_ASSERT() format warnings in ARM's arch timer test Sean Christopherson
@ 2024-03-26 13:50 ` Oliver Upton
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Upton @ 2024-03-26 13:50 UTC (permalink / raw)
To: Marc Zyngier, Sean Christopherson
Cc: Oliver Upton, linux-arm-kernel, kvmarm, linux-kernel
On Thu, 14 Mar 2024 10:51:15 -0700, Sean Christopherson wrote:
> 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}
>
> [...]
Applied to kvmarm/fixes, thanks!
[1/1] KVM: selftests: Fix __GUEST_ASSERT() format warnings in ARM's arch timer test
commit: 29b0075ed61cda250449f556fbe007a5c469440c
--
Best,
Oliver
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-26 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-14 17:51 [PATCH] KVM: selftests: Fix __GUEST_ASSERT() format warnings in ARM's arch timer test Sean Christopherson
2024-03-26 13:50 ` Oliver Upton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox