Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp205600yba; Mon, 20 May 2019 07:23:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc/II7v4AgFpCvwylkbzX4D31D9zG8UnK1Blb3aoNeFonoWoU7wUaiuEqZjfAYcwyVwH90 X-Received: by 2002:a63:5726:: with SMTP id l38mr15067467pgb.344.1558362195762; Mon, 20 May 2019 07:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558362195; cv=none; d=google.com; s=arc-20160816; b=GFL3FznFBLgMhBCWVR/8Y5D9t0p7U/UM2fPl/tFlom9y8L+qh0XozVRoW+MdBHAQ5A /vLeXaydcaK96JxugFswZzG4Otxg7ImcyRzqTaoqy6Nsj4xT7oc6uPNv1vc1Drf3vEUT vhBtwd+eB+T1Urnj5uS0XQt29oNlNEEkO5tGXPror/s+fkI//9Z9GQmgsJtcXrpEPsPa hWPRFmUJtgfmEDvt8YTXqGyuLmGiIW5zxHA9hj4J9NMVQkOWvoJNk/oiJUFMR0P4vw/8 YV9thziwYhANpqX8nBayqVi2JNe8G2qc6y26gOH/Vg9bW9ZgBpmGBAnzPXmlHFdIqqKx E6TA== 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:mime-version :message-id:date:subject:cc:to:from; bh=sMTs4v0PU/u4vnSB/Kp13bG1uR4x5xfgEJpuKcZ5hi8=; b=YqqdpwDO/tBywsHmB/J1UUUILZtLB9s27eNAcpfp5EIjYTk+H3RcCnqYdvhoedEW5l Prhs74Ti7GJT7KIhgREenLJ7DQM6mOzsaL1yllWGLrn0cjQYSLLdfOHTDnWMDXX1mWxQ t1Q5GcDqxNsRR6fuZLOXaEtZkOg2ZfsbR63Te1GYnETp5nU2Jgz1aOZQ7kdkJLz+ukoA DtLgS8cEECDAnQc0qNuvQsR4EU9sotp6oGr7JvY1TRfNv1uRS2wxtvh+JGCtchNHB2vA z64KXKUsltUymNTYPKYkwcT+ekIEcU17Ea8leweWWdz1MlUby+1+KIPrS9k72Dk+Du8b WgSA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 g14si18387977plm.192.2019.05.20.07.22.59; Mon, 20 May 2019 07:23:15 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732200AbfETKzZ (ORCPT + 99 others); Mon, 20 May 2019 06:55:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42648 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbfETKzZ (ORCPT ); Mon, 20 May 2019 06:55:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6572630842B0; Mon, 20 May 2019 10:55:25 +0000 (UTC) Received: from thuth.com (ovpn-117-9.ams2.redhat.com [10.36.117.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id 964CA5D967; Mon, 20 May 2019 10:55:22 +0000 (UTC) From: Thomas Huth To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Vitaly Kuznetsov Cc: Shuah Khan , linux-kselftest@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] KVM: selftests: Remove duplicated TEST_ASSERT in hyperv_cpuid.c Date: Mon, 20 May 2019 12:55:11 +0200 Message-Id: <20190520105511.12471-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 20 May 2019 10:55:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The check for entry->index == 0 is done twice. One time should be sufficient. Suggested-by: Vitaly Kuznetsov Signed-off-by: Thomas Huth --- Vitaly already noticed this in his review to the "Fix a condition in test_hv_cpuid()" patch a couple of days ago, but so far I haven't seen any patch yet on the list that fixes this ... if I missed it instead, please simply ignore this patch. tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c index 9a21e912097c..8bdf1e7da6cc 100644 --- a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c +++ b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c @@ -52,9 +52,6 @@ static void test_hv_cpuid(struct kvm_cpuid2 *hv_cpuid_entries, TEST_ASSERT(entry->index == 0, ".index field should be zero"); - TEST_ASSERT(entry->index == 0, - ".index field should be zero"); - TEST_ASSERT(entry->flags == 0, ".flags field should be zero"); -- 2.21.0