qemu/hw/pci-host
Markus Armbruster 3c6ef471ee sysbus: Convert to sysbus_realize() etc. with Coccinelle
Convert from qdev_realize(), qdev_realize_and_unref() with null @bus
argument to sysbus_realize(), sysbus_realize_and_unref().

Coccinelle script:

    @@
    expression dev, errp;
    @@
    -    qdev_realize(DEVICE(dev), NULL, errp);
    +    sysbus_realize(SYS_BUS_DEVICE(dev), errp);

    @@
    expression sysbus_dev, dev, errp;
    @@
    +    sysbus_dev = SYS_BUS_DEVICE(dev);
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(sysbus_dev, errp);
    -    sysbus_dev = SYS_BUS_DEVICE(dev);

    @@
    expression sysbus_dev, dev, errp;
    expression expr;
    @@
         sysbus_dev = SYS_BUS_DEVICE(dev);
         ... when != dev = expr;
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(sysbus_dev, errp);

    @@
    expression dev, errp;
    @@
    -    qdev_realize_and_unref(DEVICE(dev), NULL, errp);
    +    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);

    @@
    expression dev, errp;
    @@
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);

Whitespace changes minimized manually.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-46-armbru@redhat.com>
[Conflicts in hw/misc/empty_slot.c and hw/sparc/leon3.c resolved]
2020-06-15 22:05:28 +02:00
..
bonito.c sysbus: Convert to sysbus_realize() 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 sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +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_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_phb3.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
pnv_phb4.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