KVM: selftests: memslot_perf_test: Use data->nslots in prepare_vm()
authorGavin Shan <gshan@redhat.com>
Thu, 20 Oct 2022 07:12:04 +0000 (15:12 +0800)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Nov 2022 18:56:14 +0000 (18:56 +0000)
commit3bfadb2325891d122771ce534336af531e93d7b2
tree0918d0410bb734484bb9e4e5e47323776664e448
parent30a0b95b1335e12efef89dd78518ed3e4a71a763
KVM: selftests: memslot_perf_test: Use data->nslots in prepare_vm()

In prepare_vm(), 'data->nslots' is assigned with 'max_mem_slots - 1'
at the beginning, meaning they are interchangeable.

Use 'data->nslots' isntead of 'max_mem_slots - 1'. With this, it
becomes easier to move the logic of probing number of slots into
upper layer in subsequent patches.

No functional change intended.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221020071209.559062-2-gshan@redhat.com
tools/testing/selftests/kvm/memslot_perf_test.c