From nobody Mon Feb 9 08:56:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1635416764; cv=none; d=zohomail.com; s=zohoarc; b=bCPRuAuRmgd9PvfV2PggiyecZNUNhOBznRWE6KOmxu0AiQPcpOx6fxn1mEEo8ukjJaMexHcJ4Sf31duZUpprp1doDniI30hLrPNsC24PKk/coinbnPVi6p2ReChtJeWVYsbixbpwbcyPfsbj65XVTG0AH021FEogSA2TRkArimg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635416764; 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=/3F/IDi7lK5xLdRB4Iz1gGna/YMFTcZfSublsfCzYZU=; b=bOQmz4vEiHZuXOJl4V8LPKrDTs+iRDqYy1tWqs9CYsE6dCl9uwCL/oQaW+eJbJifZG2lbAYgYmNaOhr2NFbh4Gbv0U5iAJUx6ODeKsyj60UOBUWEO0rh+4nYiwIPUZAV6bvYm8W/dpIZ6L73kCoCrnhiHe4g1lBtzDn3c3q5HRw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1635416764946502.0739631898608; Thu, 28 Oct 2021 03:26:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-399-aCVKYqPIPWuxLehvYp3KYA-1; Thu, 28 Oct 2021 06:26:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A6C91802B78; Thu, 28 Oct 2021 10:25:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B64B5BAE5; Thu, 28 Oct 2021 10:25:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5BA431800B9C; Thu, 28 Oct 2021 10:25:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 19SAPhpY007365 for ; Thu, 28 Oct 2021 06:25:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1466969FBD; Thu, 28 Oct 2021 10:25:43 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-7.ams2.redhat.com [10.36.112.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 128D64180; Thu, 28 Oct 2021 10:25:21 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 4186211380BA; Thu, 28 Oct 2021 12:25:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635416763; 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=/3F/IDi7lK5xLdRB4Iz1gGna/YMFTcZfSublsfCzYZU=; b=NWg3rQygxJ0km5C64UVzBWVfi2/ydEfnPyn5utk52+lRWqjdqBAdr89gKcsxg/v0/Bh8AX imFwgAccX9qeseFu/tHbeLNQlB8tgi0INt/R4v/Yli5ycUCU/Hmg61odBnP9c0zZDBTyer ZsTV3VrzGdP9KJnyurQWb8od109sw7w= X-MC-Unique: aCVKYqPIPWuxLehvYp3KYA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 3/9] qapi: Eliminate QCO_NO_OPTIONS for a slight simplification Date: Thu, 28 Oct 2021 12:25:14 +0200 Message-Id: <20211028102520.747396-4-armbru@redhat.com> In-Reply-To: <20211028102520.747396-1-armbru@redhat.com> References: <20211028102520.747396-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, pkrempa@redhat.com, ehabkost@redhat.com, qemu-block@nongnu.org, quintela@redhat.com, libvir-list@redhat.com, eblake@redhat.com, dgilbert@redhat.com, pbonzini@redhat.com, marcandre.lureau@redhat.com, philmd@redhat.com, jsnow@redhat.com, libguestfs@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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: 1635416766882100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela Reviewed-by: John Snow --- include/qapi/qmp/dispatch.h | 1 - monitor/misc.c | 3 +-- scripts/qapi/commands.py | 5 +---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h index 075203dc67..0ce88200b9 100644 --- a/include/qapi/qmp/dispatch.h +++ b/include/qapi/qmp/dispatch.h @@ -21,7 +21,6 @@ typedef void (QmpCommandFunc)(QDict *, QObject **, Error = **); =20 typedef enum QmpCommandOptions { - QCO_NO_OPTIONS =3D 0x0, QCO_NO_SUCCESS_RESP =3D (1U << 0), QCO_ALLOW_OOB =3D (1U << 1), QCO_ALLOW_PRECONFIG =3D (1U << 2), diff --git a/monitor/misc.c b/monitor/misc.c index ffe7966870..3556b177f6 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -230,8 +230,7 @@ static void monitor_init_qmp_commands(void) =20 qmp_init_marshal(&qmp_commands); =20 - qmp_register_command(&qmp_commands, "device_add", qmp_device_add, - QCO_NO_OPTIONS); + qmp_register_command(&qmp_commands, "device_add", qmp_device_add, 0); =20 QTAILQ_INIT(&qmp_cap_negotiation_commands); qmp_register_command(&qmp_cap_negotiation_commands, "qmp_capabilities", diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py index 3654825968..c8a975528f 100644 --- a/scripts/qapi/commands.py +++ b/scripts/qapi/commands.py @@ -229,15 +229,12 @@ def gen_register_command(name: str, if coroutine: options +=3D ['QCO_COROUTINE'] =20 - if not options: - options =3D ['QCO_NO_OPTIONS'] - ret =3D mcgen(''' qmp_register_command(cmds, "%(name)s", qmp_marshal_%(c_name)s, %(opts)s); ''', name=3Dname, c_name=3Dc_name(name), - opts=3D" | ".join(options)) + opts=3D' | '.join(options) or 0) return ret =20 =20 --=20 2.31.1