From nobody Tue May 7 04:21:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1603808001; cv=none; d=zohomail.com; s=zohoarc; b=hITDC9MqvVIcZqYGSQzgYZSilvl/FOsUkbVRJUQaWTFLIsV0anZ3exA4OuAa9dZ2dVcNHvL7SKDI7w0+5U9rPipLsKg0ZRBgTCxeoglOqBgC4hXOoftuZtuzRwA3creowzBP9ay3YukNGluB782lchk/0VyFKkE7/oucaLbcvjQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603808001; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=2GnV3LUoUEiyuQh5qOCY5KmkvozF6jlUq0w/RczqnTU=; b=FhotB4fVLUo0CinLw+zshR4NqIlKHShuVUXniwhj+9TG2lYlVkU4oXfTz5A6oLJJnbDvD5CiPl94dyQ3IpjzWMl7tRLYErcwpoDUDR3xTuxAR2ghOgQBPNzDi2XgFMMFLYgOHHdhwfAkKeYukqiXuxuJj18rTiH3oA4j1PbuTMg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1603808001455926.8271201944842; Tue, 27 Oct 2020 07:13:21 -0700 (PDT) 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-91-HfL9wbnkP0OmziDeXWW9LA-1; Tue, 27 Oct 2020 10:13:17 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5DBF0188C12B; Tue, 27 Oct 2020 14:13:10 +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 B7B2B5D990; Tue, 27 Oct 2020 14:13:09 +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 8EE655810D; Tue, 27 Oct 2020 14:13:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09RE5uJc030465 for ; Tue, 27 Oct 2020 10:05:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 73C8D201154F; Tue, 27 Oct 2020 14:05:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F0682011561 for ; Tue, 27 Oct 2020 14:05:54 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 19A5E803B4F for ; Tue, 27 Oct 2020 14:05:54 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-210-R9nVDjATNcetTJq-G2iW2w-1; Tue, 27 Oct 2020 10:05:50 -0400 Received: by mail-qk1-f195.google.com with SMTP id b69so1204410qkg.8 for ; Tue, 27 Oct 2020 07:05:50 -0700 (PDT) Received: from localhost.localdomain ([191.17.238.164]) by smtp.gmail.com with ESMTPSA id e8sm851975qti.28.2020.10.27.07.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 07:05:47 -0700 (PDT) X-MC-Unique: HfL9wbnkP0OmziDeXWW9LA-1 X-MC-Unique: R9nVDjATNcetTJq-G2iW2w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2GnV3LUoUEiyuQh5qOCY5KmkvozF6jlUq0w/RczqnTU=; b=VmHAWhynXtkevrYyOacr1moCnp3u6P6chix1C0diduMcX7lSEF78FVS11eMUXdDkoa YXywwnublAII13ibM78K3XtuQPTFtubbBLZOm8nc68CAAX2E9bYJVvZnc6KSbGMIB2/Z KuTMvoPme18mmzgWlte0PJ0pNHSq6+7Q0VRahDuGAHxOK9i1iLoXsf6Cpv1ZsZBRItHc wl2lV6OtFOEToaXk2lRGA9UmJzmOFbvi8iYZf+Jsrg0vP7rjgnuiHXkE28FYD6ldIgmW IdOB6PGx8SY1puQmwYK2E4R7a5dgf91iRIg66HngcNtloZxK2+oM4MiznVFx8CgdaBEK Hw5A== X-Gm-Message-State: AOAM531a9RSgJvumdKGKCkH8cnswBXsRI/+gXd9++ZxaZnZcPW1QaPw0 2sm5S2bIC3UoWpA+7KdL99x2UE7GM+P6kg== X-Google-Smtp-Source: ABdhPJx1i37kjD5jllAz/7hG2PlrwyKVwpE0Qgr9bmn78h3Ozo0XNX+KwLrncQDsynwJIIp70TGe7A== X-Received: by 2002:a37:9e8d:: with SMTP id h135mr2351977qke.7.1603807548792; Tue, 27 Oct 2020 07:05:48 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Subject: [PATCH] cpu_ppc64: compare CPU function is ignoring return value Date: Tue, 27 Oct 2020 11:05:40 -0300 Message-Id: <20201027140540.15585-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Julio Faracco 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Function to compare CPU on 64-bit PowerPC is ignoring the flag to avoid=20 failure in case of CPUs (host and guest) are incompatible. Basically, the=20 function is returning -1 even if it is set to continue. Signed-off-by: Julio Faracco --- src/cpu/cpu_ppc64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 2fedcd25da..23ea5a6a3e 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -517,7 +517,7 @@ virCPUppc64Compare(virCPUDefPtr host, virCPUDefPtr cpu, bool failIncompatible) { - virCPUCompareResult ret; + virCPUCompareResult ret =3D -1; g_autofree char *message =3D NULL; =20 if (!host || !host->model) { @@ -528,7 +528,7 @@ virCPUppc64Compare(virCPUDefPtr host, VIR_WARN("unknown host CPU"); ret =3D VIR_CPU_COMPARE_INCOMPATIBLE; } - return -1; + return ret; } =20 ret =3D ppc64Compute(host, cpu, NULL, &message); --=20 2.25.1