From nobody Thu May 15 06:04:19 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513010466787708.7264832914428; Mon, 11 Dec 2017 08:41:06 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 70CA0C0050CD; Mon, 11 Dec 2017 16:41:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D66E2D34E; Mon, 11 Dec 2017 16:41:05 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F2B643FCFB; Mon, 11 Dec 2017 16:41:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBBGetVa002257 for ; Mon, 11 Dec 2017 11:40:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 250336062A; Mon, 11 Dec 2017 16:40:55 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 391386064D for ; Mon, 11 Dec 2017 16:40:53 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 11 Dec 2017 17:40:35 +0100 Message-Id: <20171211164036.12142-6-abologna@redhat.com> In-Reply-To: <20171211164036.12142-1-abologna@redhat.com> References: <20171211164036.12142-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/6] util: Tweak s390(x) case for CPU frequency X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 11 Dec 2017 16:41:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We're going to use this branch for all architectures which don't have a way to report the CPU frequency, so remove references to any specific architecture. Avoid setting the output value again, too, since it is set to zero at the beginning of the function already. Signed-off-by: Andrea Bolognani --- src/util/virhostcpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index e74125147..3b478fc45 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -567,9 +567,7 @@ virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo, if (virHostCPUGetInfoParseCPUFrequency(line, "BogoMIPS", mhz) = < 0) goto cleanup; } else if (ARCH_IS_S390(arch)) { - /* s390x has no realistic value for CPU speed, - * assign a value of zero to signify this */ - *mhz =3D 0; + /* No reasonable way to obtain CPU frequency */ } else { VIR_WARN("Parser for /proc/cpuinfo needs to be adapted for you= r architecture"); break; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list