qemu/hw/char
Markus Armbruster 9fc7fc4d39 qom: Less verbose object_initialize_child()
All users of object_initialize_child() pass the obvious child size
argument.  Almost all pass &error_abort and no properties.  Tiresome.

Rename object_initialize_child() to
object_initialize_child_with_props() to free the name.  New
convenience wrapper object_initialize_child() automates the size
argument, and passes &error_abort and no properties.

Rename object_initialize_childv() to
object_initialize_child_with_propsv() for consistency.

Convert callers with this Coccinelle script:

    @@
    expression parent, propname, type;
    expression child, size;
    symbol error_abort;
    @@
    -    object_initialize_child(parent, propname, OBJECT(child), size, type, &error_abort, NULL)
    +    object_initialize_child(parent, propname, child, size, type, &error_abort, NULL)

    @@
    expression parent, propname, type;
    expression child;
    symbol error_abort;
    @@
    -    object_initialize_child(parent, propname, child, sizeof(*child), type, &error_abort, NULL)
    +    object_initialize_child(parent, propname, child, type)

    @@
    expression parent, propname, type;
    expression child;
    symbol error_abort;
    @@
    -    object_initialize_child(parent, propname, &child, sizeof(child), type, &error_abort, NULL)
    +    object_initialize_child(parent, propname, &child, type)

    @@
    expression parent, propname, type;
    expression child, size, err;
    expression list props;
    @@
    -    object_initialize_child(parent, propname, child, size, type, err, props)
    +    object_initialize_child_with_props(parent, propname, child, size, type, err, props)

Note that Coccinelle chokes on ARMSSE typedef vs. macro in
hw/arm/armsse.c.  Worked around by temporarily renaming the macro for
the spatch run.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
[Rebased: machine opentitan is new (commit fe0fe4735e)]
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-37-armbru@redhat.com>
2020-06-15 22:05:28 +02:00
..
bcm2835_aux.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
cadence_uart.c hw/char/cadence_uart: add clock support 2020-04-30 15:35:41 +01:00
cmsdk-apb-uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
debugcon.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
digic-uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
escc.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
etraxfs_ser.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
exynos4210_uart.c qdev: Convert uses of qdev_create() with Coccinelle 2020-06-15 22:00:10 +02:00
grlib_apbuart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
imx_serial.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ipoctal232.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
Kconfig hw/char: Move multi-serial devices into separate file 2019-05-17 15:19:39 +02:00
lm32_juart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
lm32_uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
Makefile.objs hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
mcf_uart.c qdev: Convert uses of qdev_create() with Coccinelle 2020-06-15 22:00:10 +02:00
milkymist-uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
nrf51_uart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
omap_uart.c serial: start making SerialMM a sysbus device 2020-01-07 17:23:30 +04:00
parallel-isa.c isa: Convert uses of isa_create() with Coccinelle 2020-06-15 22:05:28 +02:00
parallel.c acpi: move aml builder code for parallel device 2020-06-09 12:46:45 -04:00
pl011.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
sclpconsole-lm.c misc: Replace zero-length arrays with flexible array member (manual) 2020-03-16 22:07:42 +01:00
sclpconsole.c misc: Replace zero-length arrays with flexible array member (manual) 2020-03-16 22:07:42 +01:00
serial-isa.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
serial-pci-multi.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
serial-pci.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
serial.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
sh_serial.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
spapr_vty.c qdev: Convert uses of qdev_create() with Coccinelle 2020-06-15 22:00:10 +02:00
stm32f2xx_usart.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
terminal3270.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
trace-events hw/char/cadence_uart: add clock support 2020-04-30 15:35:41 +01:00
virtio-console.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
virtio-serial-bus.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
xen_console.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xilinx_uartlite.c hw/char/xilinx_uartlite: Replace hw_error() by qemu_log_mask() 2020-05-21 22:05:27 +01:00