summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/aarch64/hypercalls.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/hypercalls.c
parenta02395d0f3bfa4b2d2a0aa53cc0f2eaeea0e3e66 (diff)
downloadlinux-next-06fdd894b473c6cc29c9b39b82e0941cefec4e51.tar.gz
linux-next-06fdd894b473c6cc29c9b39b82e0941cefec4e51.zip
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/hypercalls.c')
-rw-r--r--tools/testing/selftests/kvm/aarch64/hypercalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/hypercalls.c b/tools/testing/selftests/kvm/aarch64/hypercalls.c
index 31f66ba97228..c62739d897d6 100644
--- a/tools/testing/selftests/kvm/aarch64/hypercalls.c
+++ b/tools/testing/selftests/kvm/aarch64/hypercalls.c
@@ -105,12 +105,12 @@ static void guest_test_hvc(const struct test_hvc_info *hc_info)
case TEST_STAGE_HVC_IFACE_FEAT_DISABLED:
case TEST_STAGE_HVC_IFACE_FALSE_INFO:
__GUEST_ASSERT(res.a0 == SMCCC_RET_NOT_SUPPORTED,
- "a0 = 0x%lx, func_id = 0x%x, arg1 = 0x%llx, stage = %u",
+ "a0 = 0x%lx, func_id = 0x%x, arg1 = 0x%lx, stage = %u",
res.a0, hc_info->func_id, hc_info->arg1, stage);
break;
case TEST_STAGE_HVC_IFACE_FEAT_ENABLED:
__GUEST_ASSERT(res.a0 != SMCCC_RET_NOT_SUPPORTED,
- "a0 = 0x%lx, func_id = 0x%x, arg1 = 0x%llx, stage = %u",
+ "a0 = 0x%lx, func_id = 0x%x, arg1 = 0x%lx, stage = %u",
res.a0, hc_info->func_id, hc_info->arg1, stage);
break;
default: