qemu-patch-raspberry4/include
Igor Mammedov 38b5d79b2e qom: add helper macro DEFINE_TYPES()
DEFINE_TYPES() will help to simplify following routine patterns:

 static void foo_register_types(void)
 {
    type_register_static(&foo1_type_info);
    type_register_static(&foo2_type_info);
    ...
 }

 type_init(foo_register_types)

or

 static void foo_register_types(void)
 {
    int i;

    for (i = 0; i < ARRAY_SIZE(type_infos); i++) {
        type_register_static(&type_infos[i]);
    }
 }

 type_init(foo_register_types)

with a single line

 DEFINE_TYPES(type_infos)

where types have static definition which could be consolidated in
a single array of TypeInfo structures.
It saves us ~6-10LOC per use case and would help to replace
imperative foo_register_types() there with declarative style of
type registration.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2017-10-17 10:34:00 +11:00
..
block nbd patches for 2017-10-14 2017-10-16 15:54:42 +01:00
chardev chardev: remove context in chr_update_read_handler 2017-09-22 21:07:27 +02:00
crypto block: convert qcrypto_block_encrypt|decrypt to take bytes offset 2017-10-06 16:30:47 +02:00
disas Fix Thumb-1 BE32 execution and disassembly. 2017-02-07 18:29:59 +00:00
exec util: move qemu_real_host_page_size/mask to osdep.h 2017-10-10 09:45:00 -07:00
fpu configure: Drop ancient Solaris 9 and earlier support 2017-07-21 15:04:05 +01:00
hw pci: conventional-pci-device and pci-express-device interfaces 2017-10-15 05:54:42 +03:00
io io: Reply to ping frames 2017-10-04 13:21:53 +01:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration migration: check pre_save return in vmstate_save_state 2017-09-27 11:36:31 +01:00
monitor block: rip out all traces of password prompting 2017-07-11 17:44:56 +02:00
net net/net.c: Add vnet_hdr support in SocketReadState 2017-07-17 20:02:11 +08:00
qapi qapi: Change data type of the FOO_lookup generated for enum FOO 2017-09-04 13:09:13 +02:00
qemu util: move qemu_real_host_page_size/mask to osdep.h 2017-10-10 09:45:00 -07:00
qom qom: add helper macro DEFINE_TYPES() 2017-10-17 10:34:00 +11:00
scsi scsi: add multipath support to qemu-pr-helper 2017-09-22 21:07:27 +02:00
standard-headers linux-headers: sync against v4.14-rc1 2017-09-29 10:58:31 +02:00
sysemu pc, pci, virtio: fixes, features 2017-10-16 17:29:16 +01:00
ui egl: misc framebuffer helper improvements. 2017-09-29 10:36:33 +02:00
elf.h tcg/s390: Use constant pool for movi 2017-09-07 11:57:35 -07:00
glib-compat.h glib-compat: move G_SOURCE_CONTINUE/REMOVE there 2017-10-10 16:33:55 +02:00
qemu-common.h maint: Include bug-reporting info in --help output 2017-08-08 17:28:53 +02:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00