From: Krish Sadhukhan <krish.sadhukhan@oracle.com>
To: Wainer dos Santos Moschetta <wainersm@redhat.com>,
pbonzini@redhat.com, rkrcmar@redhat.com
Cc: shuah@kernel.org, kvm@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: kvm: Simplify loop in kvm_create_max_vcpus test
Date: Wed, 13 Nov 2019 16:39:47 -0800 [thread overview]
Message-ID: <c814d608-538d-1d1e-c3f2-92d53624cc06@oracle.com> (raw)
In-Reply-To: <20191112142111.13528-1-wainersm@redhat.com>
On 11/12/19 6:21 AM, Wainer dos Santos Moschetta wrote:
> On kvm_create_max_vcpus test remove unneeded local
> variable in the loop that add vcpus to the VM.
>
> Signed-off-by: Wainer dos Santos Moschetta<wainersm@redhat.com>
> ---
> tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/kvm_create_max_vcpus.c b/tools/testing/selftests/kvm/kvm_create_max_vcpus.c
> index 231d79e57774..6f38c3dc0d56 100644
> --- a/tools/testing/selftests/kvm/kvm_create_max_vcpus.c
> +++ b/tools/testing/selftests/kvm/kvm_create_max_vcpus.c
> @@ -29,12 +29,9 @@ void test_vcpu_creation(int first_vcpu_id, int num_vcpus)
>
> vm = vm_create(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES, O_RDWR);
>
> - for (i = 0; i < num_vcpus; i++) {
> - int vcpu_id = first_vcpu_id + i;
> -
> + for (i = first_vcpu_id; i < first_vcpu_id + num_vcpus; i++)
> /* This asserts that the vCPU was created. */
> - vm_vcpu_add(vm, vcpu_id);
> - }
> + vm_vcpu_add(vm, i);
>
> kvm_vm_free(vm);
> }
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
next prev parent reply other threads:[~2019-11-14 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 14:21 [PATCH] selftests: kvm: Simplify loop in kvm_create_max_vcpus test Wainer dos Santos Moschetta
2019-11-14 0:39 ` Krish Sadhukhan [this message]
2019-11-14 12:16 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c814d608-538d-1d1e-c3f2-92d53624cc06@oracle.com \
--to=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=shuah@kernel.org \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox