I don't know what letter and or number to assign this batch, so I'll just call it v1 of 'qapi-implicit' :) It does, however, incorporate reviews on several patches that were in subset E v9 [1], and some that were posted (but not yet reviewed) in subset F v6 [2]; the remaining patches are new but provide the promised work at cleaning up the generated code for simple unions, so that their implicit wrapper type is now unboxed without any special-case handling.
1-7: general cleanups, including a bug fix in patch 1 8: add the framework for doing inline visits of implicit types 9-11: add is_empty() helper, including a bug fix in patch 10 12-13: use the framework for simple unions 14: use the framework for anonymous bases of flat unions 15-17: tail-end cleanups [1] https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03504.html [2] https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg04389.html Based on current qemu.git master. Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-implicitv1 and will soon be part of my branch at: http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi Backport diff based on patches that were previously posted: 001/17:[down] 'chardev: Properly initialize ChardevCommon components' 002/17:[down] 'chardev: Shorten references into ChardevBackend' 003/17:[down] 'util: Shorten references into SocketAddress' 004/17:[down] 'ui: Shorten references into InputEvent' 005/17:[----] [--] 'qapi: Avoid use of 'data' member of qapi unions' 006/17:[down] 'chardev: Drop useless ChardevDummy type' 007/17:[0002] [FC] 'qapi: Drop useless 'data' member of unions' 008/17:[down] 'qapi-visit: Factor out gen_visit_fields_call()' 009/17:[0003] [FC] 'qapi: Add type.is_empty() helper' 010/17:[----] [--] 'qapi: Fix command with named empty argument type' 011/17:[down] 'qapi-visit: Simplify visit of empty branch in union' 012/17:[down] 'qapi: Don't special-case simple union wrappers' 013/17:[down] 'qapi-visit: Move error check into gen_visit_fields_call()' 014/17:[0052] [FC] 'qapi: Allow anonymous base for flat union' 015/17:[----] [--] 'qapi: Use anonymous base in SchemaInfo' 016/17:[----] [--] 'qapi: Use anonymous base in CpuInfo' 017/17:[down] 'qapi: Make c_type() more OO-like' Remaining qapi cleanups that are still on my queue, and have had patches posted to list: - visitor cleanup: add documentation, optimize list visits, add visit_type_null(), prevent leaked memory after visit_type_FOO (reviewed as tail of subset E v9) [3] - add a JSON output visitor (unreviewed at v2) [4] - support boxed parameters for events and commands, use it to introspect netdev_add (unreviewed subset F, at v6) [5] [3] https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg03504.html [4] https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03929.html [5] https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg04389.html We'll see how much of that actually makes it in by 2.6 soft freeze. Eric Blake (17): chardev: Properly initialize ChardevCommon components chardev: Shorten references into ChardevBackend util: Shorten references into SocketAddress ui: Shorten references into InputEvent qapi: Avoid use of 'data' member of qapi unions chardev: Drop useless ChardevDummy type qapi: Drop useless 'data' member of unions qapi-visit: Factor out gen_visit_fields_call() qapi: Add type.is_empty() helper qapi: Fix command with named empty argument type qapi-visit: Simplify visit of empty branch in union qapi: Don't special-case simple union wrappers qapi-visit: Move error check into gen_visit_fields_call() qapi: Allow anonymous base for flat union qapi: Use anonymous base in SchemaInfo qapi: Use anonymous base in CpuInfo qapi: Make c_type() more OO-like scripts/qapi.py | 66 ++++++--- scripts/qapi-commands.py | 6 +- scripts/qapi-event.py | 7 +- scripts/qapi-types.py | 45 +++--- scripts/qapi-visit.py | 55 +++---- include/sysemu/char.h | 10 ++ backends/baum.c | 2 +- backends/msmouse.c | 2 +- block/nbd.c | 16 ++- block/qcow2.c | 6 +- block/vmdk.c | 8 +- blockdev.c | 49 ++++--- hmp.c | 8 +- hw/char/escc.c | 12 +- hw/input/hid.c | 36 +++-- hw/input/ps2.c | 27 ++-- hw/input/virtio-input-hid.c | 33 +++-- hw/mem/pc-dimm.c | 4 +- net/dump.c | 2 +- net/hub.c | 2 +- net/l2tpv3.c | 2 +- net/net.c | 4 +- net/netmap.c | 2 +- net/slirp.c | 2 +- net/socket.c | 2 +- net/tap.c | 4 +- net/vhost-user.c | 2 +- numa.c | 4 +- qemu-char.c | 223 ++++++++++++++++------------- qemu-nbd.c | 13 +- replay/replay-input.c | 63 ++++---- spice-qemu-char.c | 22 +-- tests/test-io-channel-socket.c | 58 ++++---- tests/test-qmp-commands.c | 7 +- tests/test-qmp-input-visitor.c | 25 ++-- tests/test-qmp-output-visitor.c | 24 ++-- tpm.c | 2 +- ui/console.c | 22 +-- ui/input-keymap.c | 10 +- ui/input-legacy.c | 26 ++-- ui/input.c | 72 +++++----- ui/vnc-auth-sasl.c | 3 +- ui/vnc.c | 62 ++++---- util/qemu-sockets.c | 44 +++--- docs/qapi-code-gen.txt | 28 ++-- qapi-schema.json | 35 ++--- qapi/introspect.json | 12 +- tests/Makefile | 1 - tests/qapi-schema/flat-union-bad-base.err | 2 +- tests/qapi-schema/flat-union-bad-base.json | 5 +- tests/qapi-schema/qapi-schema-test.json | 10 +- tests/qapi-schema/qapi-schema-test.out | 15 +- tests/qapi-schema/union-clash-data.err | 0 tests/qapi-schema/union-clash-data.exit | 1 - tests/qapi-schema/union-clash-data.json | 7 - tests/qapi-schema/union-clash-data.out | 9 -- 56 files changed, 655 insertions(+), 564 deletions(-) delete mode 100644 tests/qapi-schema/union-clash-data.err delete mode 100644 tests/qapi-schema/union-clash-data.exit delete mode 100644 tests/qapi-schema/union-clash-data.json delete mode 100644 tests/qapi-schema/union-clash-data.out -- 2.5.0