Skip to content

Commit 46fee9e

Browse files
committed
KVM: selftests: Delete superfluous, unused "stage" variable in AMX test
Delete the AMX's tests "stage" counter, as the counter is no longer used, which makes clang unhappy: x86_64/amx_test.c:224:6: error: variable 'stage' set but not used int stage, ret; ^ 1 error generated. Note, "stage" was never really used, it just happened to be dumped out by a (failed) assertion on run->exit_reason, i.e. the AMX test has no concept of stages, the code was likely copy+pasted from a different test. Fixes: c96f57b ("KVM: selftests: Make vCPU exit reason test assertion common") Reviewed-by: Jim Mattson <jmattson@google.com> Link: https://lore.kernel.org/r/20240109220302.399296-1-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 65612e9 commit 46fee9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/kvm/x86_64/amx_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ int main(int argc, char *argv[])
221221
vm_vaddr_t amx_cfg, tiledata, xstate;
222222
struct ucall uc;
223223
u32 amx_offset;
224-
int stage, ret;
224+
int ret;
225225

226226
/*
227227
* Note, all off-by-default features must be enabled before anything
@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
263263
memset(addr_gva2hva(vm, xstate), 0, PAGE_SIZE * DIV_ROUND_UP(XSAVE_SIZE, PAGE_SIZE));
264264
vcpu_args_set(vcpu, 3, amx_cfg, tiledata, xstate);
265265

266-
for (stage = 1; ; stage++) {
266+
for (;;) {
267267
vcpu_run(vcpu);
268268
TEST_ASSERT_KVM_EXIT_REASON(vcpu, KVM_EXIT_IO);
269269

0 commit comments

Comments
 (0)