qemu-patch-raspberry4/hw/pci-host
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
..
bonito.c pci: Convert uses of pci_create() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
designware.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
gpex.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
grackle.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
i440fx.c qdev: Convert uses of qdev_create() with Coccinelle 2020-06-15 22:00:10 +02:00
Kconfig hw/pci-host/bonito: Map all the Bonito64 I/O range 2020-05-26 12:09:18 +02:00
Makefile.objs hw/pci-host: Use CONFIG_PCI_BONITO to select the Bonito North Bridge 2020-05-26 12:09:18 +02:00
pam.c qom/object: Move Object typedef to 'qemu/typedefs.h' 2020-06-10 12:09:36 -04:00
pnv_phb3.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
pnv_phb3_msi.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
pnv_phb3_pbcq.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
pnv_phb4.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
pnv_phb4_pec.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
ppce500.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
prep.c qdev: Convert uses of qdev_set_parent_bus() manually 2020-06-15 22:05:28 +02:00
q35.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00
sabre.c pci: Convert uses of pci_create() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
uninorth.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
versatile.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
xen_igd_pt.c hw/pci-host/i440fx: Extract the IGD passthrough host bridge device 2019-12-18 02:34:12 +01:00
xilinx-pcie.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00