Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp595120ybc; Tue, 12 Nov 2019 06:26:35 -0800 (PST) X-Google-Smtp-Source: APXvYqxknUo/1ignGO8OLrjU+6US4UQ0dqHqQtkyim7Uo7V5l8z32dhXWCFhwyY/sZXjeimesBYQ X-Received: by 2002:a17:906:4e83:: with SMTP id v3mr28814755eju.246.1573568795531; Tue, 12 Nov 2019 06:26:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573568795; cv=none; d=google.com; s=arc-20160816; b=bxOr1dn3Z7XTHzBisynK4dtxWCYrzv8IUvWg+7l5tE9yN4sPVocAr4YegHBkVswwCZ VydjIz14owUrs/7UZdiDg9epO9sdsqfugagm7UPnKqF25hAt01Bu2yjyX5X30luWOjhX eWojkvI5BClm337r+hupoS6znuuAfSWCRRebVu654PLPac+PlAOh+myoBoWd+ZnfSTx7 OyN2R9OcmL9qxL/vmNf7u5NlMLo5MOI8g3iGVdotgN1dijmqCdPsd7rkUPCuXQScFO2a LV1HJhhHpIi1f5WjkuZq7kgpQn5633xktnQCEsoGePFRxS9bjXAPyzOyc6TZn2chdVRy 6O+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id:date :subject:cc:to:from:dkim-signature; bh=l888mZumwB9sUbXe+Otg+6BZArqn24A8WoDV+FXXsG4=; b=jPwiUGozOxgB8+Y29tDTOBesqFg34m+9XDajRq2GTdvO03CaY1UxGb7DAd5976b2Al dSWsPs7TwOirfNUKJHnakJuxXf9mfUY90FcuZHU4v4/sK2at5SbPTlwU4nPv2hDWJuSK fG1LnkWn9wGcLt7SDgyywlvvIaoEHw65QXRXTpyNNVaM0sXg6Uc7Eu+wrdYOSdCHp1Mu hVwErqZvvBZ/v0rOlt5M4LkZnmvwZ7QWx7NtrZq/nA4srMovUVLUtEeQA+Dj/3mA1teQ 30YOwNwgKcjmFqdbmdSW5AQ7ZZA0WNntVn6e9Oxj3YgPiEkacTO3qv+4gU4gvyoE24VL txOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ND8N7CHA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si15248683edc.1.2019.11.12.06.26.10; Tue, 12 Nov 2019 06:26:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ND8N7CHA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727540AbfKLOVT (ORCPT + 99 others); Tue, 12 Nov 2019 09:21:19 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54623 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726497AbfKLOVS (ORCPT ); Tue, 12 Nov 2019 09:21:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573568477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l888mZumwB9sUbXe+Otg+6BZArqn24A8WoDV+FXXsG4=; b=ND8N7CHAPfMzy9Q8O84+oaXRww/9u5FlvKVtmsveiPyo9t5edOJdm1UVjIFZ/Smt31ol58 QqVaPqGp5v/J6Ur4PW0HsYfjgr2ogsTwtiTClJO4dHehpB4ejPr29/M9jsihwDP4zoEU7d qB25zr/+YeZioR1kZ00rm1boNsJ7bxA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-346-z3MrLAg7M_mdgQ6R2J2Pqg-1; Tue, 12 Nov 2019 09:21:16 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 30694107ACC4; Tue, 12 Nov 2019 14:21:15 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1EB0101E59D; Tue, 12 Nov 2019 14:21:11 +0000 (UTC) From: Wainer dos Santos Moschetta To: 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: [PATCH] selftests: kvm: Simplify loop in kvm_create_max_vcpus test Date: Tue, 12 Nov 2019 09:21:11 -0500 Message-Id: <20191112142111.13528-1-wainersm@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: z3MrLAg7M_mdgQ6R2J2Pqg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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/tes= ting/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= ) =20 =09vm =3D vm_create(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES, O_RDWR); =20 -=09for (i =3D 0; i < num_vcpus; i++) { -=09=09int vcpu_id =3D first_vcpu_id + i; - +=09for (i =3D first_vcpu_id; i < first_vcpu_id + num_vcpus; i++) =09=09/* This asserts that the vCPU was created. */ -=09=09vm_vcpu_add(vm, vcpu_id); -=09} +=09=09vm_vcpu_add(vm, i); =20 =09kvm_vm_free(vm); } --=20 2.18.1