From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Pavel Dovgalyuk" <pavel.dovgaluk@ispras.ru>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Michael Roth" <michael.roth@amd.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 0/3] qapi: Simplify enum generation
Date: Wed, 15 Mar 2023 12:13:01 +0100 [thread overview]
Message-ID: <20230315111304.21692-1-philmd@linaro.org> (raw)
QAPI generating enum count as part of the enum forces handling
impossible switch cases. Modify qapi/types.py to generate the
enum count as a definition.
Do not try to cover the unreachable 'default' case.
Clean files covering unreachable foo__MAX case.
Since v1:
- Update documentation (Markus)
- Do not generate empty enums (Markus)
- Collect R-b tags
Philippe Mathieu-Daudé (3):
scripts/git.orderfile: Display QAPI script changes before schema ones
qapi: Do not generate empty enum
qapi: Generate enum count as definition
docs/devel/qapi-code-gen.rst | 10 +++++-----
scripts/qapi/schema.py | 5 ++++-
scripts/qapi/types.py | 11 +++++++----
scripts/qapi/visit.py | 2 --
audio/audio_template.h | 3 ---
audio/audio.c | 6 ------
migration/migration.c | 2 --
replay/replay-input.c | 12 ------------
softmmu/tpm-hmp-cmds.c | 2 --
ui/input-linux.c | 4 ----
ui/input.c | 6 ------
scripts/git.orderfile | 2 ++
12 files changed, 18 insertions(+), 47 deletions(-)
--
2.38.1
next reply other threads:[~2023-03-15 11:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 11:13 Philippe Mathieu-Daudé [this message]
2023-03-15 11:13 ` [PATCH v2 1/3] scripts/git.orderfile: Display QAPI script changes before schema ones Philippe Mathieu-Daudé
2023-03-15 11:13 ` [PATCH v2 2/3] qapi: Do not generate empty enum Philippe Mathieu-Daudé
2023-03-15 15:19 ` Stefan Berger
2023-03-15 15:25 ` Philippe Mathieu-Daudé
2023-03-15 11:13 ` [PATCH v2 3/3] qapi: Generate enum count as definition Philippe Mathieu-Daudé
2023-03-15 11:22 ` [PATCH v2 0/3] qapi: Simplify enum generation Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230315111304.21692-1-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanb@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).