From patchwork Thu Oct 5 04:50:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 729719 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a4e:0:b0:31d:da82:a3b4 with SMTP id v14csp696521wrs; Wed, 4 Oct 2023 21:59:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHL/EEwB/VOTMougJOheOjfOhCtZf3HSu8wtVxZACOY+W67MYw4mHZtcmePvZhw15pzNmiY X-Received: by 2002:a0c:e284:0:b0:65b:2008:8a25 with SMTP id r4-20020a0ce284000000b0065b20088a25mr4208332qvl.47.1696481964528; Wed, 04 Oct 2023 21:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696481964; cv=none; d=google.com; s=arc-20160816; b=OcTpNEbK0Z2+hp6SZhxkqP6Pmb5Jvgu1SOo80TZUu4vDpaS3Tug/xJApwbG2M0uanQ TCmc+vmBY1w9Z0BqEdu2cGM1mcak3Lpy7R0m1xJPdWcaXgaEWtX2kiXjMOtEvY/5kzMl MafWpjFGyYnWkLHGxZiPnU8zIwwK4dRrH1crGXrxAqFO2FaQtYXK7kGh51fW4o9C+I9O L7HydWpaeSHC8rXwjR4oSxIWUS/kM1T71MFGRSlXJc5u7lmN4VkoFigb06hxNATVcBm/ A8uhi5DOPVNn5ccRxwS5Dfnm5EOk7/kOUmeLxPbTaokWckA/G0vwWi38dfOkxSX04Rgy aa7g== 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=ZMzoYshmIKgiyI46JZRTSl2tAoK4bhnefguZfodjbZQ=; fh=UDFk7AMDAi9TGZTd8AeDYxQWxMLSVq4WmLfu6YLWv1g=; b=AuXVMmoJ+gzu5SYSVC777/YjUByZgVGYLmr3gokQZlnKrJ8FstTQoX+zX+wJZcsTV1 FecyJ4QiLIqh03SWgLn99+80HdAa1cfyhpEC7nTZsr/qaUm73RikDfhlwBaHeO8sR0Lv 0jyNxhHhfIj3T3mzrC0r0MpTaSRRptNrRCpL7Vw1H24Y0KoK61FROdLgaP10NsFigb0s Ivd4DwidGf1lUWLqrp3jPnDcrt0InTOPdsHdDMdWYYPgmDfzxymz1T8mu4TpkGiNDO0Y L7GCCNBlGagK25nDc2VlyOE8gsQzfPh91jxWQBXU0vqvpBmwraaR1c7qgXVQeuJ1zJwH N2EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VbBLU7Fe; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x13-20020a0cda0d000000b00656386f2546si382985qvj.158.2023.10.04.21.59.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2023 21:59:24 -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=@linaro.org header.s=google header.b=VbBLU7Fe; 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=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoGMN-0000is-Uf; Thu, 05 Oct 2023 00:53:16 -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 1qoGLx-00080J-JF for qemu-devel@nongnu.org; Thu, 05 Oct 2023 00:52:54 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qoGLq-0007Np-Lc for qemu-devel@nongnu.org; Thu, 05 Oct 2023 00:52:45 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-405497850dbso5030755e9.0 for ; Wed, 04 Oct 2023 21:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696481557; x=1697086357; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZMzoYshmIKgiyI46JZRTSl2tAoK4bhnefguZfodjbZQ=; b=VbBLU7FeVN2pcvXqgOlP3zxhcTirOKZVho47eQzeIhhhlUZGhUYMAnborGH/plFbwK YSDwOVv5SGHtGCJO7rQjowyEHb7HPC3gJ21qyIZBZWYfyEZjIa2YfAkD5GKOoF60su9c nCjWbUduUSgPHufAU6fIvYjPcQjKqhupMmnUvg665bL0heNP4sr6f4beNbJvbjfs6tFa MPd4QYOMaXaxqziDJOP9MRjyrBIQeRXnmHsP9g6oB9phWrGxNTBv0urRm0hyfLn3x2Nk rFuBAJ4nZq+P6jJEOrvlrMNUvVRaKvy3h+uKpB3ceRUu9jHdUXnyDp78vWS0ACED1qqV G0KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696481557; x=1697086357; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZMzoYshmIKgiyI46JZRTSl2tAoK4bhnefguZfodjbZQ=; b=rGaP1KFjkMP9lslfHL13uWsNnhYiirx18NHDoPGwVJk84VVfN+iulXVVlsdVTTPE1Y uvEJXgmgg+w/I07Exf3oxk8uC5i9mEP2K5Ua0w64MwaXL4D/6ZdGcjOfHjVEm5A2Ug0a 0TfWu7bnb2TWtQYcnpSQmW6HdAs40ajZDSbNGHT01ZblV6JOE1nsD9JIaK/lZ+almKjw omu4PTdDeBupkSExpGgDcsTK4l7FO2qodRIDXydzA4GiNgOV9qWHtdoac+x5YNadNEqb jYE0ty+7J8G9Ks6xcC8QrwG58AyjB5sWtRb89MUHW8REvEqIBgiKUdfR0Ehtvb2XqCap clTg== X-Gm-Message-State: AOJu0YyWFldrAW5XFSiw9ssH4V0MiDfOqn7uy6xZdV5rSaqaA/bb7XQy 2mhIFZIzMgoh9KCmO3DwwM/iues4KfmDTaov7zg= X-Received: by 2002:a05:600c:ad0:b0:405:375d:b860 with SMTP id c16-20020a05600c0ad000b00405375db860mr4082300wmr.21.1696481557727; Wed, 04 Oct 2023 21:52:37 -0700 (PDT) Received: from m1x-phil.lan (tbo33-h01-176-171-211-120.dsl.sta.abo.bbox.fr. [176.171.211.120]) by smtp.gmail.com with ESMTPSA id y6-20020a1c4b06000000b00405588aa40asm617496wma.24.2023.10.04.21.52.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Oct 2023 21:52:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-block@nongnu.org, qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Roth Subject: [PATCH v2 17/22] qapi: Inline and remove QERR_MISSING_PARAMETER definition Date: Thu, 5 Oct 2023 06:50:34 +0200 Message-ID: <20231005045041.52649-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231005045041.52649-1-philmd@linaro.org> References: <20231005045041.52649-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 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é --- include/qapi/qmp/qerror.h | 3 --- qapi/opts-visitor.c | 2 +- qapi/qapi-forward-visitor.c | 2 +- qapi/qobject-input-visitor.c | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index cc4dae1076..b0f48f22fe 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -17,9 +17,6 @@ * add new ones! */ -#define QERR_MISSING_PARAMETER \ - "Parameter '%s' is missing" - #define QERR_PROPERTY_VALUE_BAD \ "Property '%s.%s' doesn't take value '%s'" diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index 844db583f4..bf0d8acbd6 100644 --- a/qapi/opts-visitor.c +++ b/qapi/opts-visitor.c @@ -218,7 +218,7 @@ lookup_distinct(const OptsVisitor *ov, const char *name, Error **errp) list = g_hash_table_lookup(ov->unprocessed_opts, name); if (!list) { - error_setg(errp, QERR_MISSING_PARAMETER, name); + error_setg(errp, "Parameter '%s' is missing", name); } return list; } diff --git a/qapi/qapi-forward-visitor.c b/qapi/qapi-forward-visitor.c index e36d9bc9ba..3fb2c954aa 100644 --- a/qapi/qapi-forward-visitor.c +++ b/qapi/qapi-forward-visitor.c @@ -49,7 +49,7 @@ static bool forward_field_translate_name(ForwardFieldVisitor *v, const char **na *name = v->to; return true; } - error_setg(errp, QERR_MISSING_PARAMETER, *name); + error_setg(errp, "Parameter '%s' is missing", *name); return false; } diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c index f5fa6c1878..17e9f3b638 100644 --- a/qapi/qobject-input-visitor.c +++ b/qapi/qobject-input-visitor.c @@ -168,7 +168,7 @@ static QObject *qobject_input_get_object(QObjectInputVisitor *qiv, QObject *obj = qobject_input_try_get_object(qiv, name, consume); if (!obj) { - error_setg(errp, QERR_MISSING_PARAMETER, full_name(qiv, name)); + error_setg(errp, "Parameter '%s' is missing", full_name(qiv, name)); } return obj; }