qemu-e2k/hw/s390x
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
..
3270-ccw.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ap-bridge.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
ap-device.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
ccw-device.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ccw-device.h
css-bridge.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
css.c Avoid address_space_rw() with a constant is_write argument 2020-02-20 14:47:08 +01:00
event-facility.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
ipl.c s390x: protvirt: Support unpack facility 2020-04-29 14:30:54 +02:00
ipl.h s390x/s390-virtio-ccw: Fix build on systems without KVM 2020-04-29 14:36:19 +02:00
Kconfig kconfig: add CONFIG_MSI_NONBROKEN 2019-03-18 09:39:57 +01:00
Makefile.objs s390x: protvirt: Support unpack facility 2020-04-29 14:30:54 +02:00
pv.c s390x: pv: Fix KVM_PV_PREP_RESET command wrapper name 2020-06-05 17:13:11 +02:00
s390-ccw.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
s390-pci-bus.c qdev: Convert uses of qdev_create() manually 2020-06-15 22:05:08 +02:00
s390-pci-bus.h s390x/pci: Drop release timer and replace it with a flag 2019-02-04 13:47:50 +01:00
s390-pci-inst.c add device_legacy_reset function to prepare for reset api change 2020-01-30 16:02:03 +00:00
s390-pci-inst.h s390x/pci: add common function measurement block 2019-01-18 11:52:01 +01:00
s390-skeys-kvm.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
s390-skeys.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
s390-stattrib-kvm.c vl/s390x: fixup ram sizes for compat machines 2020-04-02 17:10:09 +02:00
s390-stattrib.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
s390-virtio-ccw.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
s390-virtio-hcall.c
s390-virtio-hcall.h
sclp.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
sclpcpu.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
sclpquiesce.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tod-kvm.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
tod-qemu.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
tod.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
vhost-vsock-ccw.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-9p.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-balloon.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-blk.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-crypto.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-gpu.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-input.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-net.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-rng.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-scsi.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw-serial.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-ccw.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
virtio-ccw.h qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00