From patchwork Wed Oct 4 17:31:51 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: 729312 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a4e:0:b0:31d:da82:a3b4 with SMTP id v14csp479300wrs; Wed, 4 Oct 2023 10:36:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6j0eCVJbKDQ4eE+yFVxWxkwKCuoc2wtn8CzY0htkVXTv9E7u8Fus1tfNms/wm0s5mkO+F X-Received: by 2002:a05:620a:2889:b0:76c:df5d:13a9 with SMTP id j9-20020a05620a288900b0076cdf5d13a9mr3464387qkp.58.1696440977978; Wed, 04 Oct 2023 10:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696440977; cv=none; d=google.com; s=arc-20160816; b=b/YkpA0qOR4g9BFKMv/MiME/v7lS61hJOCNGNXzU+msoTAbYgO3kBSiyGtgsjjuuV8 mftBwVdBHJHMRQQk5gmb3f4GhR/+ZRcGpFF1nIO/sq/CrM55cgD0ag4nsAaiiFBSJAH1 piQJzZcVtgXaNiG93aZQtitsn8gA6MVxriG0mWGdpHRUUNXUlSq4Eb00XXmZjzHYUZEA 8BdUrDpkdWcR4liFANre1TnNJ2KtzvSRD551o2rMk/6UtMqpgqIegq6gov8U2lWEs3fn OWkyQ8MfQpOuDiP8qIJdy/dEFkkC7NY6c8OToZtSfg7x9tGXL6n6tn3/uAwc6ztDUFy3 hkLg== 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=qzFiq2mTf6+A1Urj7c6RXNxTkCqydwvsp7xKZURtKhw=; b=IS4H63ggkfsupsWckZn7VNfumU6ynRPlWgTbMDd6sYZW2n2bLfeAwbkzPKL9dHgyp9 uk15R6jYIOmlQeIaj/YFMNsIggTe4yfjmyBwybv6+BCjIjBhDMH7FX37wRcEgsLD6+A/ HDsh08w1ddBp0o5yYpZLPdMOl7y9EoSipxkYheHSIl+z4SMVC7Dh2v77PFIBqk3zNJpZ x3XZaaErT1zCp2hcvIdbp2sTLhF52mGg2jvFc7WhjyB3bR/6u1r7ryzYHhm2Z/Z1qLbd QUbJPSZR2AbNO64XiY133ZKxo6D8//rXHhv6XNTPdLVv3xTKrwmDjWBiX8QcmlWB4KNE uyAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SPzsInjl; 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 w10-20020a05620a424a00b0076cb04a68ddsi1692560qko.609.2023.10.04.10.36.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2023 10:36:17 -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=SPzsInjl; 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 1qo5l3-0005Fh-P9; Wed, 04 Oct 2023 13:34:01 -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 1qo5kw-00053c-UD for qemu-devel@nongnu.org; Wed, 04 Oct 2023 13:33:55 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo5kv-0001Gp-3s for qemu-devel@nongnu.org; Wed, 04 Oct 2023 13:33:54 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-31c5cac3ae2so94724f8f.3 for ; Wed, 04 Oct 2023 10:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696440831; x=1697045631; 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=SPzsInjlowfDayG/a8nkQuspKf6w14l0qIKS7blCzN1gGAXtU23Sh/2et7Cn3Bt1fr 4c9bj5uXVYIN4xG3UbSN0+YTznXSoCfCEX6sGDDHGgHXKnv6k2CcObZNEnlY05u7iB0x pj4j45Bt/BltLAKsJ885Pix+3M4e5/jLFmhT+uvfzz2+SXpTThENqGNp0inKPZqstl7p QiV+airD+6AT2xZVusRhG0//rG4+YMbbkmOfuwf7oKAGG04Ju7cxQ6cFRlCDHmYCbu6a X64u897h+LiJr8ywe3yOwB/2Zj6egGo+67Y2+H5l1AoFDHzXssft/jZTGxkjYp0vJ79I z/GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696440831; x=1697045631; 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=I6BVTk2fSATZnn0eNxi9gVjRcHTJuVXLHTaNxSih2Oyif/5pv13hC9SbCOZ1e/BUhg s+qeGss+rCmjbEs/gCE93tPvQu8otrsap4vPjS/cKJDD/4yLt2j6/6yk/jR+EJJ5hfS2 4AUq56gmHTfeB68yQnkK2Kf/B6sYFZIQsRBTOaZq7OlvYCKLtcFB33g1EG6a28tErf1S ffBcUns8NUij4uU9zOIxRe715XYBsQvwn5o/Rh3yUBDdmOHcfiuhYAxtgyCPTVxGpDq5 IbRUkpGjfAu4Jk8cNybVOvc54l8yXA5c3Q/S73VadsrFznBVx00FWr+sklupt/9FSxYr 1ueg== X-Gm-Message-State: AOJu0YzHjlGf9UhsRzfCHUsGSIJagMZNftY2G9LLsfqlOhygJ0RzjlAE 2SrR99dG4wI2B2erRulM7Ueu8IzztygkU3ZO10I= X-Received: by 2002:adf:ecc3:0:b0:319:7c0f:d920 with SMTP id s3-20020adfecc3000000b003197c0fd920mr2875094wro.57.1696440831513; Wed, 04 Oct 2023 10:33:51 -0700 (PDT) Received: from m1x-phil.lan (5ep85-h01-176-173-163-52.dslam.bbox.fr. [176.173.163.52]) by smtp.gmail.com with ESMTPSA id v22-20020a1cf716000000b003fefcbe7fa8sm2013488wmh.28.2023.10.04.10.33.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Oct 2023 10:33:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Roth Subject: [PATCH 16/21] qapi: Inline and remove QERR_MISSING_PARAMETER definition Date: Wed, 4 Oct 2023 19:31:51 +0200 Message-ID: <20231004173158.42591-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004173158.42591-1-philmd@linaro.org> References: <20231004173158.42591-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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; }