From nobody Mon Feb 9 09:15:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677853745; cv=none; d=zohomail.com; s=zohoarc; b=MpcZU6ZAsw3a3vb51kWbpuRuI/bEbksxkn0XH044X2/VjRp1T4W+yTYnkfAi5o/1mTk9PVv5MATMCrOilJmDhp6CEwFwsuHWq/t8rAFlOUeWE0DGtJNS6WKpViXxOJNomhrMCgCuU3VbKRso/sRXKwsvIu0aFHu64oyc8o8HviI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677853745; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pUX3+FNjpVqUFC1PVKT/vWBmRVEkFWy+YfTgHbIZKZU=; b=QUabemI2q8E56PR0rsFR+p+0irhbPi5rWQeCP7fO0sPYhpT9UvLfl4z4kBTOoPNvJ7NqmZmpmhYIB2shKMZOKgb1dEAZHx96Kkohc/iP/XSOItrcXM5x7lw75ueAyoPYZ1PhZYMMRHGIVRv96PX5TKgoQp31jH+vngP9ZoeMKtI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1677853745069155.0410842594057; Fri, 3 Mar 2023 06:29:05 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-354-b99BaprnNKG6GCdx5HvzuA-1; Fri, 03 Mar 2023 09:29:00 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2028804187; Fri, 3 Mar 2023 14:28:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D1FE492C18; Fri, 3 Mar 2023 14:28:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 57A2B1942879; Fri, 3 Mar 2023 14:28:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 73E541943BFF for ; Fri, 3 Mar 2023 14:28:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6E66E404BEC8; Fri, 3 Mar 2023 14:28:23 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED721404BEC9 for ; Fri, 3 Mar 2023 14:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677853744; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=pUX3+FNjpVqUFC1PVKT/vWBmRVEkFWy+YfTgHbIZKZU=; b=chznz+XiHvHNmOJgnbehF41jCJT35xGjBg0k/l2e11aOfBUAFe6wZOXI0RY3z9XrSyuGuG ET+9UASOWFPHz3D8t+Vfy9mETQH3k8WQx0ngWySos9+N3I//RmcisK4EMEbXp5KkhMMC7B fRnBZMI6n4SNFHJGm/RoI0vkAOCsdnI= X-MC-Unique: b99BaprnNKG6GCdx5HvzuA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 17/31] qemu: capabilities: Remove return value from virQEMUCapsHostCPUDataCopy Date: Fri, 3 Mar 2023 15:27:51 +0100 Message-Id: <8bd3da0e952e4746cad486a37970d341a1a42e29.1677853487.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677853746763100004 Content-Type: text/plain; charset="utf-8" The function can't fail at this point. Remove the last outstanding pointless error check and turn the return type into 'void'. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 94e6e2b914..5341f5c1da 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1849,13 +1849,12 @@ virQEMUCapsNewBinary(const char *binary) } -static int +static void virQEMUCapsHostCPUDataCopy(virQEMUCapsHostCPUData *dst, virQEMUCapsHostCPUData *src) { - if (src->info && - !(dst->info =3D qemuMonitorCPUModelInfoCopy(src->info))) - return -1; + if (src->info) + dst->info =3D qemuMonitorCPUModelInfoCopy(src->info); if (src->reported) dst->reported =3D virCPUDefCopy(src->reported); @@ -1865,8 +1864,6 @@ virQEMUCapsHostCPUDataCopy(virQEMUCapsHostCPUData *ds= t, if (src->full) dst->full =3D virCPUDefCopy(src->full); - - return 0; } @@ -1968,8 +1965,7 @@ virQEMUCapsAccelCopy(virQEMUCapsAccel *dst, { virQEMUCapsAccelCopyMachineTypes(dst, src); - if (virQEMUCapsHostCPUDataCopy(&dst->hostCPU, &src->hostCPU) < 0) - return -1; + virQEMUCapsHostCPUDataCopy(&dst->hostCPU, &src->hostCPU); dst->cpuModels =3D qemuMonitorCPUDefsCopy(src->cpuModels); --=20 2.39.2