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
ap-bridge.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
ap-device.c
ccw-device.c
ccw-device.h
css-bridge.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
css.c
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
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
s390-pci-inst.c
s390-pci-inst.h
s390-skeys-kvm.c
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
sclpquiesce.c
tod-kvm.c
tod-qemu.c
tod.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
trace-events
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