qemu-e2k/hw/i386
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
..
kvm qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
xen * Miscellaneous fixes and feature enablement (many) 2020-06-12 23:06:22 +01:00
acpi-build.c * Miscellaneous fixes and feature enablement (many) 2020-06-12 23:06:22 +01:00
acpi-build.h nvdimm: Use configurable ACPI IO base and size 2020-05-04 10:25:02 -04:00
acpi-common.c acpi: madt: skip pci override on pci-less systems. 2020-06-12 10:17:06 -04:00
acpi-common.h acpi: madt: skip pci override on pci-less systems. 2020-06-12 10:17:06 -04:00
amd_iommu.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
amd_iommu.h
e820_memory_layout.c
e820_memory_layout.h
fw_cfg.c
fw_cfg.h
intel_iommu_internal.h intel_iommu: add present bit check for pasid table entries 2020-01-06 12:04:51 -05:00
intel_iommu.c hw/i386/intel_iommu: Fix out-of-bounds access on guest IRT 2020-03-16 23:02:22 +01:00
Kconfig tpm: Separate TPM_TIS and TPM_TIS_ISA configs 2020-03-05 12:18:00 -05:00
kvmvapic.c
Makefile.objs acpi: create acpi-common.c and move madt code 2020-06-12 10:17:06 -04:00
microvm.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
multiboot.c hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
multiboot.h
pc_piix.c xen: fix build without pci passthrough 2020-06-12 11:20:12 -04:00
pc_q35.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
pc_sysfw.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
pc.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00
port92.c
trace-events
vmmouse.c hw/i386/vmport: Define enum for all commands 2020-06-10 12:09:46 -04:00
vmport.c hw/i386/vmport: Allow QTest use without crashing 2020-06-10 12:10:27 -04:00
x86-iommu-stub.c hw/i386/x86-iommu: Add missing stubs 2020-01-09 11:41:25 +00:00
x86-iommu.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
x86.c sysbus: Convert to sysbus_realize() etc. with Coccinelle 2020-06-15 22:05:28 +02:00