From patchwork Wed Apr 24 08:03:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 791502 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp700001wrq; Wed, 24 Apr 2024 01:04:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVv+AQIs7GdDFVNcnQDdBf+V5Y52nkFRIr+mcm0M40s1aq20aw28q4Tvbf0b7WeISCw2XjpbOBdE5KvSvcAbFmZ X-Google-Smtp-Source: AGHT+IHHAMOEQC/mMmh7NEnXANNGoiIq5AUyJD3HK32dE5rC8YXffJG7gRauki1Izv87nyOtrOD7 X-Received: by 2002:a05:6359:4288:b0:186:1d2a:a467 with SMTP id kp8-20020a056359428800b001861d2aa467mr2018607rwb.22.1713945852509; Wed, 24 Apr 2024 01:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713945852; cv=none; d=google.com; s=arc-20160816; b=Agc1FzSDKH8EljfIe+EHf/xWXtWpoUFdN5n6Y9tH+YjpHW/yqU+E4Dws0lO7p0WDSk /JvcwNk3IGgTUyuOmTX8WjYV2EgYT3d7ItyVCaWoL4NK8VAMd9HoPen/nzeI7yxDb/pQ T0vZpH59W972GxueSHa/Mwyp6TJpVN7A5AfRq4NMI4tULbhUE+cyJbDMUbVIc/YfKpwr ulLIEresJCYgjAIs5yyBunyzwk6nOrHFL86Vu64O/dKxb0D1fYJ3VFDscCIEcGkWQIls FJoxcQkx9qc/P660vVW9Aw+GZSwMr+XESBXdrggiSCPjwSJHa2GYig12NS5xgycd/XB5 UxQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C0vcnHD36q3vBRtSJzWoo1mOJokKaLTmecVzyyv/5dE=; fh=axzdzWpyk9nBHGlMTHXAA8pRXwojiLsYurKeeecLVqM=; b=WTTB9ITpwpGX0F004Jxon2aIzFQNJK7MFWiV2k+df6ziV3TgwJ1Uoe1Z1PH+c7R9Cw QnxCpL+BlJRufS/iHPiPlGJf7NDUFcsIRpPxRnXe3+zbXrws955R/Nto/yXDM1ApdzFS VtieTTlZiTRE8sSULLD0mjtzYNx7vdxm/OQHrSrNIjl6ll+GDUuJoB6nHF95/1+KexOk 5Iy/SvPYeY6Z3wipzwpTtX2393VyJkXgnDbQLn6MSIHE1b9kiKFlhu1PxZ6H5bkJKjOk Rfm0cxGXHMxmXzc2TlCnvnyUkUaJvTTPZHYCqE41aBhR/kOnHrrK5ePmG20P4MdmE34A xR6g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BaHFvdr0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ea8-20020a05622a5b0800b0043780b2b689si8733412qtb.575.2024.04.24.01.04.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 01:04:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BaHFvdr0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzXbp-0006P3-LG; Wed, 24 Apr 2024 04:04:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzXbY-0005te-JV for qemu-devel@nongnu.org; Wed, 24 Apr 2024 04:03:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzXbW-0003oV-N1 for qemu-devel@nongnu.org; Wed, 24 Apr 2024 04:03:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713945824; h=from:from: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; bh=C0vcnHD36q3vBRtSJzWoo1mOJokKaLTmecVzyyv/5dE=; b=BaHFvdr0gQLd7ZW1wXT6hNtdAO+4nYj9UbUAPI3CcCXtCbUbL4iIfT2/oQ4rYdRN3FKYDC 4824vzhRcEK/IJpu4jkEraDdYPnLOHY9IzbFZiiisvOXqpc8wdd9IReLeYTEB7uR2PmSZb ltPUOAXcDmBMRY3xqSq5yMeP1gsayYQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-201-POa6OTM0OZyIeAXV6jgEVQ-1; Wed, 24 Apr 2024 04:03:39 -0400 X-MC-Unique: POa6OTM0OZyIeAXV6jgEVQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4610F812C55; Wed, 24 Apr 2024 08:03:39 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.247]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2599F1C060D0; Wed, 24 Apr 2024 08:03:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 512FD21E65E1; Wed, 24 Apr 2024 10:03:37 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Juan Quintela , Zhao Liu Subject: [PULL 09/10] qapi: Inline and remove QERR_MIGRATION_ACTIVE definition Date: Wed, 24 Apr 2024 10:03:36 +0200 Message-ID: <20240424080337.2782594-10-armbru@redhat.com> In-Reply-To: <20240424080337.2782594-1-armbru@redhat.com> References: <20240424080337.2782594-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.67, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Address the comment added in commit 4629ed1e98 ("qerror: Finally unused, clean up"), from 2015: /* * These macros will go away, please don't use * in new code, and do not add new ones! */ Mechanical transformation using sed, manually removing the definition in include/qapi/qmp/qerror.h. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Markus Armbruster Message-ID: <20240312141343.3168265-10-armbru@redhat.com> Reviewed-by: Zhao Liu [Straightforward conflict with commit aeaafb1e59f (migration: export migration_is_running) resolved] --- include/qapi/qmp/qerror.h | 3 --- migration/migration.c | 2 +- migration/options.c | 4 ++-- migration/savevm.c | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index b723830eff..385a4876d6 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -23,9 +23,6 @@ #define QERR_IO_ERROR \ "An IO error has occurred" -#define QERR_MIGRATION_ACTIVE \ - "There's a migration process in progress" - #define QERR_MISSING_PARAMETER \ "Parameter '%s' is missing" diff --git a/migration/migration.c b/migration/migration.c index 86bf76e925..32cd89e13d 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1956,7 +1956,7 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, } if (migration_is_running()) { - error_setg(errp, QERR_MIGRATION_ACTIVE); + error_setg(errp, "There's a migration process in progress"); return false; } diff --git a/migration/options.c b/migration/options.c index d7a773aea8..239f5ecfb4 100644 --- a/migration/options.c +++ b/migration/options.c @@ -685,7 +685,7 @@ bool migrate_cap_set(int cap, bool value, Error **errp) bool new_caps[MIGRATION_CAPABILITY__MAX]; if (migration_is_running()) { - error_setg(errp, QERR_MIGRATION_ACTIVE); + error_setg(errp, "There's a migration process in progress"); return false; } @@ -729,7 +729,7 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params, bool new_caps[MIGRATION_CAPABILITY__MAX]; if (migration_is_running() || migration_in_colo_state()) { - error_setg(errp, QERR_MIGRATION_ACTIVE); + error_setg(errp, "There's a migration process in progress"); return; } diff --git a/migration/savevm.c b/migration/savevm.c index e7c1215671..3fae9f155f 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1707,7 +1707,7 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp) MigrationStatus status; if (migration_is_running()) { - error_setg(errp, QERR_MIGRATION_ACTIVE); + error_setg(errp, "There's a migration process in progress"); return -EINVAL; }