From b914e741e91ad2b1515dcded57ff5a5e07ec353d Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Thu, 5 Aug 2021 15:34:31 -0400 Subject: 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 Message-Id: <20210805193431.307761-7-ehabkost@redhat.com> Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-host/i440fx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/pci-host') diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index 28c9bae899..cd87e21a9b 100644 --- a/hw/pci-host/i440fx.c +++ b/hw/pci-host/i440fx.c @@ -316,9 +316,7 @@ PCIBus *i440fx_init(const char *host_type, const char *pci_type, PCIBus *find_i440fx(void) { - PCIHostState *s = OBJECT_CHECK(PCIHostState, - object_resolve_path("/machine/i440fx", NULL), - TYPE_PCI_HOST_BRIDGE); + PCIHostState *s = PCI_HOST_BRIDGE(object_resolve_path("/machine/i440fx", NULL)); return s ? s->bus : NULL; } -- cgit v1.2.3