From nobody Sun Feb 8 15:42:29 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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=1652196130; cv=none; d=zohomail.com; s=zohoarc; b=M7g9SfeoE4BcWVbrH/L+sma/tgRzqPqX8sgPPFWAZkhrN5Mu+BG5sB6HzH+LHDfz6zj2u8hBbMmA7Lk73LMWxDPyVe4qm3MvhIl11a0Kbn5KQd+310c/64LvxGx3yH31tvy449uOFu+m8xPHEgE5uxj/yIjvcB/cLgaazJPQyQ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652196130; 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=KeEP+8YUh4n8BjTWV9SeJ8HDk9/JZM/4DQNy/CgG9RE=; b=SigQIbj6r9Er1wwJ1oeLFF+uoCnnturRYi31rfVWKFj5akqawrDFz9eEg7ZnbtgJtMAGl09lctI+2Ufwu0ZfiReN13mrvUUz+36mhpLAGeLnPk1M67emOAHtAe9IA0+muH0gD61Yg94CZtUCMiPUZ/u+M1GNrinC62MlGT/dId8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1652196130371490.0371057325531; Tue, 10 May 2022 08:22:10 -0700 (PDT) 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-599-uPENe9yxM2yodiAW_i7X0w-1; Tue, 10 May 2022 11:22:01 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E3D711801391; Tue, 10 May 2022 15:21:46 +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 CE3DE14E09EA; Tue, 10 May 2022 15:21:46 +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 B6C521947059; Tue, 10 May 2022 15:21:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DAD4F1947079 for ; Tue, 10 May 2022 15:21:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CD24A54B072; Tue, 10 May 2022 15:21:45 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA4EA54B085 for ; Tue, 10 May 2022 15:21:45 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 7C6332445EC; Tue, 10 May 2022 17:21:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652196129; 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=KeEP+8YUh4n8BjTWV9SeJ8HDk9/JZM/4DQNy/CgG9RE=; b=HFJQY57gTVMMybWr+P+30pq1gOVev31uB/oWYtQuXjceSYUKzTCyQmpTkOp0p1dHDRmkS8 GFjw8pvwI/Tp0VxT1Jzud3EDVrnvvGxlbBnDRXU7bz80uPCn6LTJm0v27Qe/bfpQbOGS3o dCZeglf43/yGlTH7IdaLnCcfVQiyrRA= X-MC-Unique: uPENe9yxM2yodiAW_i7X0w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 08/80] qemu: Make qemuDomainCleanupAdd return void Date: Tue, 10 May 2022 17:20:29 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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 2.85 on 10.11.54.7 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-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652196132480100009 Content-Type: text/plain; charset="utf-8" The function never returns anything but zero. Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa --- src/qemu/qemu_domain.c | 5 ++--- src/qemu/qemu_domain.h | 4 ++-- src/qemu/qemu_migration.c | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 51236b19f2..7ad84f7080 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7436,7 +7436,7 @@ qemuDomainCheckDiskStartupPolicy(virQEMUDriver *drive= r, * The vm must be locked when any of the following cleanup functions is * called. */ -int +void qemuDomainCleanupAdd(virDomainObj *vm, qemuDomainCleanupCallback cb) { @@ -7447,7 +7447,7 @@ qemuDomainCleanupAdd(virDomainObj *vm, =20 for (i =3D 0; i < priv->ncleanupCallbacks; i++) { if (priv->cleanupCallbacks[i] =3D=3D cb) - return 0; + return; } =20 VIR_RESIZE_N(priv->cleanupCallbacks, @@ -7455,7 +7455,6 @@ qemuDomainCleanupAdd(virDomainObj *vm, priv->ncleanupCallbacks, 1); =20 priv->cleanupCallbacks[priv->ncleanupCallbacks++] =3D cb; - return 0; } =20 void diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index c7125722e0..3ea0426c7e 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -746,8 +746,8 @@ int qemuDomainPrepareStorageSourceBlockdev(virDomainDis= kDef *disk, qemuDomainObjPrivate *priv, virQEMUDriverConfig *cfg); =20 -int qemuDomainCleanupAdd(virDomainObj *vm, - qemuDomainCleanupCallback cb); +void qemuDomainCleanupAdd(virDomainObj *vm, + qemuDomainCleanupCallback cb); void qemuDomainCleanupRemove(virDomainObj *vm, qemuDomainCleanupCallback cb); void qemuDomainCleanupRun(virQEMUDriver *driver, diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 3e3203471a..19337878e4 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3098,8 +3098,7 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver, VIR_WARN("Unable to encode migration cookie"); } =20 - if (qemuDomainCleanupAdd(vm, qemuMigrationDstPrepareCleanup) < 0) - goto stopjob; + qemuDomainCleanupAdd(vm, qemuMigrationDstPrepareCleanup); =20 if (!(flags & VIR_MIGRATE_OFFLINE)) { virDomainAuditStart(vm, "migrated", true); --=20 2.35.1