From nobody Sat Feb 7 08:44:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1637245256074893.077029736003; Thu, 18 Nov 2021 06:20:56 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-343-9qrTv0c9PNWz670WVF25ew-1; Thu, 18 Nov 2021 09:20:51 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3F959F92B; Thu, 18 Nov 2021 14:20:44 +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 B550368D7D; Thu, 18 Nov 2021 14:20:44 +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 83DA34E58E; Thu, 18 Nov 2021 14:20:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AIEKgXp012985 for ; Thu, 18 Nov 2021 09:20:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id C8B55404727A; Thu, 18 Nov 2021 14:20:42 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4BBB4047279 for ; Thu, 18 Nov 2021 14:20:42 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ACC98811E8D for ; Thu, 18 Nov 2021 14:20:42 +0000 (UTC) Received: from mail-ua1-f44.google.com (mail-ua1-f44.google.com [209.85.222.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-217-PEBZ9qh9P3m8mIME08rpyA-1; Thu, 18 Nov 2021 09:20:41 -0500 Received: by mail-ua1-f44.google.com with SMTP id o1so14017223uap.4 for ; Thu, 18 Nov 2021 06:20:41 -0800 (PST) Received: from rekt.ibmuc.com ([152.250.208.89]) by smtp.gmail.com with ESMTPSA id b8sm1734306vsl.19.2021.11.18.06.20.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 06:20:40 -0800 (PST) X-MC-Unique: 9qrTv0c9PNWz670WVF25ew-1 X-MC-Unique: PEBZ9qh9P3m8mIME08rpyA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=woR61WsW5lGCKmzSZN+jzH6G382my6ZXoqT+N6I9MxE=; b=uR8+TNplW5uDE4IuvsEb2MCPv7HaM53aJlx4KMlY5LDN5d5NzvDS9ZbNqsXPrcs+XW pNrXcjHpMeAH6kRLQwfYfMgcqLESa84r7e+JmGnvhLgGBJvu0rZxFnvika/LWIx1NmN/ 1DUmHwU1M9U6zuc6H92YxjgHklPhRco2ncLv3/D428rbjkSZwhwYOfx9Fu7bwms+fQZ+ FheviNX9TE0oVkwBQNR3RD07pVk/lPAugvNQcGr2rwrph7ZeXQMnDrgrrm5RpKLvNlVu 3gKHhLDY4ThEQll6D2udGU6VOt+XhF0ywuxpHecPtXy4D0zeqYV2W9zO2ZgByUX0X8ve DYcA== X-Gm-Message-State: AOAM53084fBr4G+17HpDB3etI1n/zCX9zFOqZnXSlIn/0sf0xCO9Z4e5 JRnAwXZMbVmqhdWb6FNXmJAe1lUXkXgR5A== X-Google-Smtp-Source: ABdhPJzGjsnbzgWNyNrf+C0OU3tGA9oIUI8x5pkBxr9QR+eSY3AovWY5XB7c/2EDhpPGGU+jNGn2tg== X-Received: by 2002:ab0:3d0d:: with SMTP id f13mr38381801uax.48.1637245240523; Thu, 18 Nov 2021 06:20:40 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 3/7] cpu_ppc64.c: remove 'guest' param from ppc64Compute() Date: Thu, 18 Nov 2021 11:20:20 -0300 Message-Id: <20211118142024.275704-4-danielhb413@gmail.com> In-Reply-To: <20211118142024.275704-1-danielhb413@gmail.com> References: <20211118142024.275704-1-danielhb413@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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: danielhb413@gmail.com 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.16 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 X-ZM-MESSAGEID: 1637245256340100001 Content-Type: text/plain; charset="utf-8" ppc64Compute() is used only once, by virCPUppc64Compare(), which doesn't use the 'guest' parameter. The reason is similar to what was mentioned in the previous patch: this parameter was being used by an API called 'cpuGuestData' that was dropped by commit 03fa904c0c0cb2. Removing the 'guest' parameter will not only remove unused code from ppc64Compute() but also remove the ppc64MakeCPUData() entirely. Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index c7caaa9608..314d2f7c86 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -379,32 +379,15 @@ ppc64LoadMap(void) return g_steal_pointer(&map); } =20 -static virCPUData * -ppc64MakeCPUData(virArch arch, - virCPUppc64Data *data) -{ - g_autoptr(virCPUData) cpuData =3D NULL; - - cpuData =3D g_new0(virCPUData, 1); - cpuData->arch =3D arch; - - if (ppc64DataCopy(&cpuData->data.ppc64, data) < 0) - return NULL; - - return g_steal_pointer(&cpuData); -} - static virCPUCompareResult ppc64Compute(virCPUDef *host, const virCPUDef *other, - virCPUData **guestData, char **message) { g_autoptr(virCPUppc64Map) map =3D NULL; g_autoptr(virCPUppc64Model) host_model =3D NULL; g_autoptr(virCPUppc64Model) guest_model =3D NULL; g_autoptr(virCPUDef) cpu =3D NULL; - virArch arch; size_t i; =20 /* Ensure existing configurations are handled correctly */ @@ -431,9 +414,6 @@ ppc64Compute(virCPUDef *host, =20 return VIR_CPU_COMPARE_INCOMPATIBLE; } - arch =3D cpu->arch; - } else { - arch =3D host->arch; } =20 if (cpu->vendor && @@ -506,10 +486,6 @@ ppc64Compute(virCPUDef *host, return VIR_CPU_COMPARE_INCOMPATIBLE; } =20 - if (guestData) - if (!(*guestData =3D ppc64MakeCPUData(arch, &guest_model->data))) - return VIR_CPU_COMPARE_ERROR; - return VIR_CPU_COMPARE_IDENTICAL; } =20 @@ -532,7 +508,7 @@ virCPUppc64Compare(virCPUDef *host, return VIR_CPU_COMPARE_INCOMPATIBLE; } =20 - ret =3D ppc64Compute(host, cpu, NULL, &message); + ret =3D ppc64Compute(host, cpu, &message); =20 if (failIncompatible && ret =3D=3D VIR_CPU_COMPARE_INCOMPATIBLE) { ret =3D VIR_CPU_COMPARE_ERROR; --=20 2.31.1