From 446de8b68a33834b9130f5ba182e8cdf8749c759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 7 Jun 2017 20:36:11 +0400 Subject: qdev: Use appropriate getter/setters type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on the underlying type of the data accessed, use the appropriate getters/setters: * AcpiPmInfo members s3_disabled, s4_disabled are bool, member s4_val is an uint8_t * Property ACPI_PCIHP_IO_PROP is defined with object_property_add_uint32_ptr() * Property PCIE_HOST_MCFG_SIZE is implemented with visit_type_uint64() * PCIDevice property "addr" is backed by PCIDevice member devfn, which is an int32_t Signed-off-by: Marc-André Lureau Message-Id: <20170607163635.17635-20-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster [More verbose commit message] Signed-off-by: Markus Armbruster --- hw/pci-host/q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/pci-host/q35.c') diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index c2f2af5..564f6cb 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -172,7 +172,7 @@ static void q35_host_initfn(Object *obj) object_initialize(&s->mch, sizeof(s->mch), TYPE_MCH_PCI_DEVICE); object_property_add_child(OBJECT(s), "mch", OBJECT(&s->mch), NULL); - qdev_prop_set_uint32(DEVICE(&s->mch), "addr", PCI_DEVFN(0, 0)); + qdev_prop_set_int32(DEVICE(&s->mch), "addr", PCI_DEVFN(0, 0)); qdev_prop_set_bit(DEVICE(&s->mch), "multifunction", false); object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_START, "uint32", -- cgit v1.1