summaryrefslogtreecommitdiff
path: root/hw/i386/acpi-build.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-07 20:36:11 +0400
committerMarkus Armbruster <armbru@redhat.com>2017-06-20 14:31:32 +0200
commit446de8b68a33834b9130f5ba182e8cdf8749c759 (patch)
tree2978fcd8edfe0a6dc9c64cc165f297591f5cfeb1 /hw/i386/acpi-build.c
parentd528227d4c30869dce6fa81124d12b39bcb987cf (diff)
downloadqemu-446de8b68a33834b9130f5ba182e8cdf8749c759.zip
qdev: Use appropriate getter/setters type
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 <marcandre.lureau@redhat.com> Message-Id: <20170607163635.17635-20-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [More verbose commit message] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r--hw/i386/acpi-build.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 3eb43677f0..b2dc3d8580 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -149,21 +149,21 @@ static void acpi_get_pm_info(AcpiPmInfo *pm)
/* Fill in optional s3/s4 related properties */
o = object_property_get_qobject(obj, ACPI_PM_PROP_S3_DISABLED, NULL);
if (o) {
- pm->s3_disabled = qnum_get_int(qobject_to_qnum(o));
+ pm->s3_disabled = qnum_get_uint(qobject_to_qnum(o));
} else {
pm->s3_disabled = false;
}
qobject_decref(o);
o = object_property_get_qobject(obj, ACPI_PM_PROP_S4_DISABLED, NULL);
if (o) {
- pm->s4_disabled = qnum_get_int(qobject_to_qnum(o));
+ pm->s4_disabled = qnum_get_uint(qobject_to_qnum(o));
} else {
pm->s4_disabled = false;
}
qobject_decref(o);
o = object_property_get_qobject(obj, ACPI_PM_PROP_S4_VAL, NULL);
if (o) {
- pm->s4_val = qnum_get_int(qobject_to_qnum(o));
+ pm->s4_val = qnum_get_uint(qobject_to_qnum(o));
} else {
pm->s4_val = false;
}
@@ -528,7 +528,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
bsel = object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL, NULL);
if (bsel) {
- int64_t bsel_val = qnum_get_int(qobject_to_qnum(bsel));
+ uint64_t bsel_val = qnum_get_uint(qobject_to_qnum(bsel));
aml_append(parent_scope, aml_name_decl("BSEL", aml_int(bsel_val)));
notify_method = aml_method("DVNT", 2, AML_NOTSERIALIZED);
@@ -638,7 +638,7 @@ static void build_append_pci_bus_devices(Aml *parent_scope, PCIBus *bus,
/* If bus supports hotplug select it and notify about local events */
if (bsel) {
- int64_t bsel_val = qnum_get_int(qobject_to_qnum(bsel));
+ uint64_t bsel_val = qnum_get_uint(qobject_to_qnum(bsel));
aml_append(method, aml_store(aml_int(bsel_val), aml_name("BNUM")));
aml_append(method,
@@ -2619,7 +2619,7 @@ static bool acpi_get_mcfg(AcpiMcfgInfo *mcfg)
o = object_property_get_qobject(pci_host, PCIE_HOST_MCFG_SIZE, NULL);
assert(o);
- mcfg->mcfg_size = qnum_get_int(qobject_to_qnum(o));
+ mcfg->mcfg_size = qnum_get_uint(qobject_to_qnum(o));
qobject_decref(o);
return true;
}