From: Paolo Bonzini <pbonzini@redhat.com>
To: Wainer dos Santos Moschetta <wainersm@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: Thu, 14 Nov 2019 13:16:31 +0100 [thread overview]
Message-ID: <70986b1a-5a04-cbd6-fe1a-fda4d97d5a72@redhat.com> (raw)
In-Reply-To: <20191112142111.13528-1-wainersm@redhat.com>
On 12/11/19 15:21, 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);
> }
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2019-11-14 12:16 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
2019-11-14 12:16 ` Paolo Bonzini [this message]
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=70986b1a-5a04-cbd6-fe1a-fda4d97d5a72@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).