diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2021-08-05 15:34:31 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-09-04 09:07:46 -0400 |
commit | b914e741e91ad2b1515dcded57ff5a5e07ec353d (patch) | |
tree | bec16e5791c673893e4e52ae7dfa05261d6671ff /hw/i386 | |
parent | 3a83db5df34090d872dc1dccf36064849f8f90eb (diff) | |
download | qemu-b914e741e91ad2b1515dcded57ff5a5e07ec353d.zip qemu-b914e741e91ad2b1515dcded57ff5a5e07ec353d.tar.gz qemu-b914e741e91ad2b1515dcded57ff5a5e07ec353d.tar.bz2 |
Use PCI_HOST_BRIDGE macro
OBJECT_CHECK(PciHostState, ..., TYPE_PCI_HOST_BRIDGE) is exactly
what the PCI_HOST_BRIDGE macro does. We can just use the macro
instead of using OBJECT_CHECK manually.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20210805193431.307761-7-ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/acpi-build.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 6c27e12..9a9572c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -303,13 +303,9 @@ Object *acpi_get_i386_pci_host(void) { PCIHostState *host; - host = OBJECT_CHECK(PCIHostState, - object_resolve_path("/machine/i440fx", NULL), - TYPE_PCI_HOST_BRIDGE); + host = PCI_HOST_BRIDGE(object_resolve_path("/machine/i440fx", NULL)); if (!host) { - host = OBJECT_CHECK(PCIHostState, - object_resolve_path("/machine/q35", NULL), - TYPE_PCI_HOST_BRIDGE); + host = PCI_HOST_BRIDGE(object_resolve_path("/machine/q35", NULL)); } return OBJECT(host); |