Skip to content

qapi: Simplify enum generation

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2qapi: Do not generate default switch case in gen_visit_object_members()scripts/qapi/visit.py+0 -22 replies
2/2qapi: Generate enum count as definition in gen_enum_lookup()audio/audio.c audio/audio_template.h migration/migration.c +5 more+7 -394 replies

Reviews trailers per patch

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

PatchRichard HendersonJuan Quintela
1/2R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] 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.

Philippe Mathieu-Daudé (2):
qapi: Do not generate default switch case in
gen_visit_object_members()
qapi: Generate enum count as definition in gen_enum_lookup()

 audio/audio.c          |  6 ------
 audio/audio_template.h |  3 ---
 migration/migration.c  |  2 --
 replay/replay-input.c  | 12 ------------
 scripts/qapi/types.py  | 11 +++++++----
 scripts/qapi/visit.py  |  2 --
 softmmu/tpm-hmp-cmds.c |  2 --
 ui/input-linux.c       |  4 ----
 ui/input.c             |  6 ------
 9 files changed, 7 insertions(+), 41 deletions(-)
Signature · 1 line
2.38.1