Skip to content

qapi: Simplify enum generation

Philippe Mathieu-Daudé qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 15 repliesIn review
  2. v23 patches 3 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v3 from the cover letter

- Post correct branch generating empty foo-qapi-emit-events.h

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3scripts/git.orderfile: Display QAPI script changes before schema onesscripts/git.orderfile+2 -02 replies
2/3qapi: Do not generate empty enumdocs/devel/qapi-code-gen.rst scripts/qapi/events.py scripts/qapi/schema.py +1 more+11 -412 replies
3/3qapi: Generate enum count as definitionaudio/audio.c audio/audio_template.h docs/devel/qapi-code-gen.rst +7 more+9 -431 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonJuan QuintelaDr. David Alan Gilbert
1/3R-b
2/3R-b
3/3R-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/3] qapi: Simplify enum generation

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 v2:
- Post correct branch generating empty foo-qapi-emit-events.h

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/events.py       |  2 ++
 scripts/qapi/schema.py       |  5 ++++-
 scripts/qapi/types.py        | 13 +++++++++----
 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 ++
 13 files changed, 22 insertions(+), 47 deletions(-)
Signature · 1 line
2.38.1