[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 4/8] hw/arm/virt: Use object_property_set instead of qdev_prop
From: |
Jean-Philippe Brucker |
Subject: |
[PATCH v7 4/8] hw/arm/virt: Use object_property_set instead of qdev_prop_set |
Date: |
Fri, 10 Dec 2021 17:04:12 +0000 |
To propagate errors to the caller of the pre_plug callback, use the
object_poperty_set*() functions directly instead of the qdev_prop_set*()
helpers.
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
hw/arm/virt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 608a0a78f0..6b51e8ad10 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2518,8 +2518,9 @@ static void
virt_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev,
db_start, db_end,
VIRTIO_IOMMU_RESV_MEM_T_MSI);
- qdev_prop_set_uint32(dev, "len-reserved-regions", 1);
- qdev_prop_set_string(dev, "reserved-regions[0]", resv_prop_str);
+ object_property_set_uint(OBJECT(dev), "len-reserved-regions", 1, errp);
+ object_property_set_str(OBJECT(dev), "reserved-regions[0]",
+ resv_prop_str, errp);
g_free(resv_prop_str);
}
}
--
2.34.1
- [PATCH v7 0/8] virtio-iommu: Add ACPI support (Arm part + tests), Jean-Philippe Brucker, 2021/12/10
- [PATCH v7 2/8] hw/arm/virt: Remove device tree restriction for virtio-iommu, Jean-Philippe Brucker, 2021/12/10
- [PATCH v7 1/8] hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu, Jean-Philippe Brucker, 2021/12/10
- [PATCH v7 5/8] tests/acpi: allow updates of VIOT expected data files, Jean-Philippe Brucker, 2021/12/10
- [PATCH v7 6/8] tests/acpi: add test case for VIOT, Jean-Philippe Brucker, 2021/12/10
- [PATCH v7 8/8] tests/acpi: add expected blob for VIOT test on virt machine, Jean-Philippe Brucker, 2021/12/10
- [PATCH v7 3/8] hw/arm/virt: Reject instantiation of multiple IOMMUs, Jean-Philippe Brucker, 2021/12/10
- [PATCH v7 4/8] hw/arm/virt: Use object_property_set instead of qdev_prop_set,
Jean-Philippe Brucker <=
- [PATCH v7 7/8] tests/acpi: add expected blobs for VIOT test on q35 machine, Jean-Philippe Brucker, 2021/12/10
- Re: [PATCH v7 0/8] virtio-iommu: Add ACPI support (Arm part + tests), Ani Sinha, 2021/12/11
Re: [PATCH v7 0/8] virtio-iommu: Add ACPI support (Arm part + tests), Michael S. Tsirkin, 2021/12/13