summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/aarch64/arch_timer.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2024-02-02 15:46:03 -0800
committerOliver Upton <oliver.upton@linux.dev>2024-02-12 20:41:49 +0000
commit06fdd894b473c6cc29c9b39b82e0941cefec4e51 (patch)
treefd430f5fafe26853bfade7ab8a3bcf12e980cc88 /tools/testing/selftests/kvm/aarch64/arch_timer.c
parenta02395d0f3bfa4b2d2a0aa53cc0f2eaeea0e3e66 (diff)
KVM: selftests: Fix GUEST_PRINTF() format warnings in ARM code
Fix a pile of -Wformat warnings in the KVM ARM selftests code, almost all of which are benign "long" versus "long long" issues (selftests are 64-bit only, and the guest printf code treats "ll" the same as "l"). The code itself isn't problematic, but the warnings make it impossible to build ARM selftests with -Werror, which does detect real issues from time to time. Opportunistically have GUEST_ASSERT_BITMAP_REG() interpret set_expected, which is a bool, as an unsigned decimal value, i.e. have it print '0' or '1' instead of '0x0' or '0x1'. Signed-off-by: Sean Christopherson <seanjc@google.com> Tested-by: Zenghui Yu <yuzenghui@huawei.com> Link: https://lore.kernel.org/r/20240202234603.366925-1-seanjc@google.com Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/testing/selftests/kvm/aarch64/arch_timer.c')
-rw-r--r--tools/testing/selftests/kvm/aarch64/arch_timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/arch_timer.c b/tools/testing/selftests/kvm/aarch64/arch_timer.c
index 274b8465b42a..d5e8f365aa01 100644
--- a/tools/testing/selftests/kvm/aarch64/arch_timer.c
+++ b/tools/testing/selftests/kvm/aarch64/arch_timer.c
@@ -158,9 +158,9 @@ static void guest_validate_irq(unsigned int intid,
/* Basic 'timer condition met' check */
__GUEST_ASSERT(xcnt >= cval,
- "xcnt = 0x%llx, cval = 0x%llx, xcnt_diff_us = 0x%llx",
+ "xcnt = 0x%lx, cval = 0x%lx, xcnt_diff_us = 0x%lx",
xcnt, cval, xcnt_diff_us);
- __GUEST_ASSERT(xctl & CTL_ISTATUS, "xcnt = 0x%llx", xcnt);
+ __GUEST_ASSERT(xctl & CTL_ISTATUS, "xcnt = 0x%lx", xcnt);
WRITE_ONCE(shared_data->nr_iter, shared_data->nr_iter + 1);
}