From nobody Sun Feb 8 12:31:38 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=1654087844; cv=none; d=zohomail.com; s=zohoarc; b=UodxTMFpbRIqdAezNapcXAzudU5v7ABWwwxfczHNqHW5RQ0nCT41TyBp8MJy6SagvIdDwCckU9V5bgmYLcAZGneNhzB+ZCLKbDu1hjPx3n/onEqYKS49AMQQzE4xGOcz5/WjrdFgy+Zvc56yVBktjHGaOMSjANV03yqudEuOjNo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654087844; h=Content-Type:Content-Transfer-Encoding:Cc: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=GfGD7F+MIO6VU7eNgsnKEWzV/VIOZiY6UU8nRYHrA1A=; b=bHSLH8TtlavnJVP9xnnyg9bMt+hdHeIl+D7uQOkWhUkpgcrfWGmEF9LQIRr0a+5jzUbyp+ycT63Xu865tidzkzyt8JdutYD6NFSvPbAwmojCsEe2CD5NfigdgT4/eEbQ75tOl9Kz/MguPFyeCuHUzxR113iMaCfjW4dwafHH3SU= 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 1654087844586154.7401228852957; Wed, 1 Jun 2022 05:50:44 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-452-N9A-ZLNTP_edWAPGjR-ttw-1; Wed, 01 Jun 2022 08:50:34 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C616F381685F; Wed, 1 Jun 2022 12:50:30 +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 B213C492C3B; Wed, 1 Jun 2022 12:50:30 +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 BF4951947BAD; Wed, 1 Jun 2022 12:50:28 +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 C012419451F0 for ; Wed, 1 Jun 2022 12:50:27 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B195240CFD0E; Wed, 1 Jun 2022 12:50:27 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.227]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8FFC940CF8EB; Wed, 1 Jun 2022 12:50:27 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 6506D245B52; Wed, 1 Jun 2022 14:50:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654087842; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=GfGD7F+MIO6VU7eNgsnKEWzV/VIOZiY6UU8nRYHrA1A=; b=dS+rtwkULyh2eFms7WQRDlHPdfKgubnpTRvPjJvuOgEJeZc+7JR6V5cs6w+QAByUJdr//Q ROwTxw+i8up6/tJPndUbHK1ibVS4lc9rchAMBca0zNocqYSEyjY+pPDjFjzRM82P8cFMIT QSUjJHx51Crm/kPInzuf/2EwGZywlp4= X-MC-Unique: N9A-ZLNTP_edWAPGjR-ttw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH v2 06/81] qemu: Make qemuDomainCleanupAdd return void Date: Wed, 1 Jun 2022 14:49:06 +0200 Message-Id: <233f467ce744d25b38dfb862f3de23b8b1cb5340.1654087150.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 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: , Cc: Peter Krempa , Pavel Hrdina Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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: 1654087845659100001 Content-Type: text/plain; charset="utf-8" The function never returns anything but zero. Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa Reviewed-by: Pavel Hrdina --- Notes: Version 2: - no change 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 6f358466c5..5dee9c6f26 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7475,7 +7475,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) { @@ -7486,7 +7486,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, @@ -7494,7 +7494,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 547d85b5f9..ce2dba499c 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -762,8 +762,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 274386d6d9..fee3e8826b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3071,8 +3071,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