From nobody Thu Nov 6 16:24:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489239135731690.5262820233107; Sat, 11 Mar 2017 05:32:15 -0800 (PST) Received: from localhost ([::1]:43433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmh82-0000HD-DE for importer@patchew.org; Sat, 11 Mar 2017 08:32:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmgzg-00027t-SV for qemu-devel@nongnu.org; Sat, 11 Mar 2017 08:23:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmgzf-0002Yj-Om for qemu-devel@nongnu.org; Sat, 11 Mar 2017 08:23:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33168) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cmgzf-0002Y8-GB for qemu-devel@nongnu.org; Sat, 11 Mar 2017 08:23:35 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE420811A7; Sat, 11 Mar 2017 13:23:35 +0000 (UTC) Received: from localhost (ovpn-116-13.phx2.redhat.com [10.3.116.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id C996E2D655; Sat, 11 Mar 2017 13:23:34 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Sat, 11 Mar 2017 17:22:44 +0400 Message-Id: <20170311132256.22951-10-marcandre.lureau@redhat.com> In-Reply-To: <20170311132256.22951-1-marcandre.lureau@redhat.com> References: <20170311132256.22951-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 11 Mar 2017 13:23:35 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 09/21] qdev: use appropriate type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, anderson@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , pbonzini@redhat.com, lersek@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/i386/acpi-build.c | 15 ++++++++------- hw/pci-host/gpex.c | 2 +- hw/pci-host/q35.c | 2 +- hw/pci-host/xilinx-pcie.c | 2 +- target/i386/cpu.c | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 2073108577..76bff18e3f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -58,6 +58,7 @@ #include "hw/acpi/aml-build.h" =20 #include "qapi/qmp/qint.h" +#include "qapi/qmp/quint.h" #include "qom/qom-qobject.h" #include "hw/i386/amd_iommu.h" #include "hw/i386/intel_iommu.h" @@ -150,21 +151,21 @@ static void acpi_get_pm_info(AcpiPmInfo *pm) /* Fill in optional s3/s4 related properties */ o =3D object_property_get_qobject(obj, ACPI_PM_PROP_S3_DISABLED, NULL); if (o) { - pm->s3_disabled =3D qint_get_int(qobject_to_qint(o)); + pm->s3_disabled =3D quint_get_uint(qobject_to_quint(o)); } else { pm->s3_disabled =3D false; } qobject_decref(o); o =3D object_property_get_qobject(obj, ACPI_PM_PROP_S4_DISABLED, NULL); if (o) { - pm->s4_disabled =3D qint_get_int(qobject_to_qint(o)); + pm->s4_disabled =3D quint_get_uint(qobject_to_quint(o)); } else { pm->s4_disabled =3D false; } qobject_decref(o); o =3D object_property_get_qobject(obj, ACPI_PM_PROP_S4_VAL, NULL); if (o) { - pm->s4_val =3D qint_get_int(qobject_to_qint(o)); + pm->s4_val =3D quint_get_uint(qobject_to_quint(o)); } else { pm->s4_val =3D false; } @@ -500,7 +501,7 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, =20 bsel =3D object_property_get_qobject(OBJECT(bus), ACPI_PCIHP_PROP_BSEL= , NULL); if (bsel) { - int64_t bsel_val =3D qint_get_int(qobject_to_qint(bsel)); + uint64_t bsel_val =3D quint_get_uint(qobject_to_quint(bsel)); =20 aml_append(parent_scope, aml_name_decl("BSEL", aml_int(bsel_val))); notify_method =3D aml_method("DVNT", 2, AML_NOTSERIALIZED); @@ -610,7 +611,7 @@ static void build_append_pci_bus_devices(Aml *parent_sc= ope, PCIBus *bus, =20 /* If bus supports hotplug select it and notify about local events */ if (bsel) { - int64_t bsel_val =3D qint_get_int(qobject_to_qint(bsel)); + uint64_t bsel_val =3D quint_get_uint(qobject_to_quint(bsel)); aml_append(method, aml_store(aml_int(bsel_val), aml_name("BNUM"))); aml_append(method, aml_call2("DVNT", aml_name("PCIU"), aml_int(1) /* Device Check= */) @@ -2586,12 +2587,12 @@ static bool acpi_get_mcfg(AcpiMcfgInfo *mcfg) if (!o) { return false; } - mcfg->mcfg_base =3D qint_get_int(qobject_to_qint(o)); + mcfg->mcfg_base =3D quint_get_uint(qobject_to_quint(o)); qobject_decref(o); =20 o =3D object_property_get_qobject(pci_host, PCIE_HOST_MCFG_SIZE, NULL); assert(o); - mcfg->mcfg_size =3D qint_get_int(qobject_to_qint(o)); + mcfg->mcfg_size =3D quint_get_uint(qobject_to_quint(o)); qobject_decref(o); return true; } diff --git a/hw/pci-host/gpex.c b/hw/pci-host/gpex.c index 66055ee5cc..8d3a64008c 100644 --- a/hw/pci-host/gpex.c +++ b/hw/pci-host/gpex.c @@ -94,7 +94,7 @@ static void gpex_host_initfn(Object *obj) =20 object_initialize(root, sizeof(*root), TYPE_GPEX_ROOT_DEVICE); object_property_add_child(obj, "gpex_root", OBJECT(root), NULL); - qdev_prop_set_uint32(DEVICE(root), "addr", PCI_DEVFN(0, 0)); + qdev_prop_set_int32(DEVICE(root), "addr", PCI_DEVFN(0, 0)); qdev_prop_set_bit(DEVICE(root), "multifunction", false); } =20 diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 5438be8253..3cbe8cfcea 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -173,7 +173,7 @@ static void q35_host_initfn(Object *obj) =20 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); =20 object_property_add(obj, PCI_HOST_PROP_PCI_HOLE_START, "uint32", diff --git a/hw/pci-host/xilinx-pcie.c b/hw/pci-host/xilinx-pcie.c index 8b71e2d950..461ed41151 100644 --- a/hw/pci-host/xilinx-pcie.c +++ b/hw/pci-host/xilinx-pcie.c @@ -150,7 +150,7 @@ static void xilinx_pcie_host_init(Object *obj) =20 object_initialize(root, sizeof(*root), TYPE_XILINX_PCIE_ROOT); object_property_add_child(obj, "root", OBJECT(root), NULL); - qdev_prop_set_uint32(DEVICE(root), "addr", PCI_DEVFN(0, 0)); + qdev_prop_set_int32(DEVICE(root), "addr", PCI_DEVFN(0, 0)); qdev_prop_set_bit(DEVICE(root), "multifunction", false); } =20 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index fba92125ab..54f859bc8d 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3176,7 +3176,7 @@ static void x86_cpu_apic_create(X86CPU *cpu, Error **= errp) OBJECT(cpu->apic_state), &error_abort); object_unref(OBJECT(cpu->apic_state)); =20 - qdev_prop_set_uint32(cpu->apic_state, "id", cpu->apic_id); + qdev_prop_set_int32(cpu->apic_state, "id", cpu->apic_id); /* TODO: convert to link<> */ apic =3D APIC_COMMON(cpu->apic_state); apic->cpu =3D cpu; --=20 2.12.0.191.gc5d8de91d