[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 16/24] hw/arm/armsse: Use device_class_set_props_n
From: |
Richard Henderson |
Subject: |
[PATCH v2 16/24] hw/arm/armsse: Use device_class_set_props_n |
Date: |
Wed, 18 Dec 2024 07:42:43 -0600 |
We must remove DEFINE_PROP_END_OF_LIST so the count is correct.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/arm/armsse.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
index 1cd6b4a4b2..ffd732f806 100644
--- a/hw/arm/armsse.c
+++ b/hw/arm/armsse.c
@@ -72,6 +72,7 @@ struct ARMSSEInfo {
bool has_cpu_pwrctrl;
bool has_sse_counter;
bool has_tcms;
+ uint8_t props_count;
const Property *props;
const ARMSSEDeviceInfo *devinfo;
const bool *irq_is_common;
@@ -87,7 +88,6 @@ static const Property iotkit_properties[] = {
DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true),
DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8),
DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8),
- DEFINE_PROP_END_OF_LIST()
};
static const Property sse200_properties[] = {
@@ -104,7 +104,6 @@ static const Property sse200_properties[] = {
DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8),
DEFINE_PROP_UINT32("CPU1_MPU_NS", ARMSSE, cpu_mpu_ns[1], 8),
DEFINE_PROP_UINT32("CPU1_MPU_S", ARMSSE, cpu_mpu_s[1], 8),
- DEFINE_PROP_END_OF_LIST()
};
static const Property sse300_properties[] = {
@@ -117,7 +116,6 @@ static const Property sse300_properties[] = {
DEFINE_PROP_BOOL("CPU0_DSP", ARMSSE, cpu_dsp[0], true),
DEFINE_PROP_UINT32("CPU0_MPU_NS", ARMSSE, cpu_mpu_ns[0], 8),
DEFINE_PROP_UINT32("CPU0_MPU_S", ARMSSE, cpu_mpu_s[0], 8),
- DEFINE_PROP_END_OF_LIST()
};
static const ARMSSEDeviceInfo iotkit_devices[] = {
@@ -528,6 +526,7 @@ static const ARMSSEInfo armsse_variants[] = {
.has_sse_counter = false,
.has_tcms = false,
.props = iotkit_properties,
+ .props_count = ARRAY_SIZE(iotkit_properties),
.devinfo = iotkit_devices,
.irq_is_common = sse200_irq_is_common,
},
@@ -549,6 +548,7 @@ static const ARMSSEInfo armsse_variants[] = {
.has_sse_counter = false,
.has_tcms = false,
.props = sse200_properties,
+ .props_count = ARRAY_SIZE(sse200_properties),
.devinfo = sse200_devices,
.irq_is_common = sse200_irq_is_common,
},
@@ -570,6 +570,7 @@ static const ARMSSEInfo armsse_variants[] = {
.has_sse_counter = true,
.has_tcms = true,
.props = sse300_properties,
+ .props_count = ARRAY_SIZE(sse300_properties),
.devinfo = sse300_devices,
.irq_is_common = sse300_irq_is_common,
},
@@ -1699,7 +1700,7 @@ static void armsse_class_init(ObjectClass *klass, void
*data)
dc->realize = armsse_realize;
dc->vmsd = &armsse_vmstate;
- device_class_set_props(dc, info->props);
+ device_class_set_props_n(dc, info->props, info->props_count);
device_class_set_legacy_reset(dc, armsse_reset);
iic->check = armsse_idau_check;
asc->info = info;
--
2.43.0
- [PATCH v2 17/24] rust/qemu-api: Use device_class_set_props_n, (continued)
- [PATCH v2 17/24] rust/qemu-api: Use device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 19/24] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST, Richard Henderson, 2024/12/18
- [PATCH v2 22/24] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr, Richard Henderson, 2024/12/18
- [PATCH v2 09/24] hw/xen: Remove empty Property lists, Richard Henderson, 2024/12/18
- [PATCH v2 12/24] include/hw/qdev-core: Detect most empty Property lists at compile time, Richard Henderson, 2024/12/18
- [PATCH v2 13/24] hw/core: Introduce device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 15/24] hw/scsi/megasas: Use device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 16/24] hw/arm/armsse: Use device_class_set_props_n,
Richard Henderson <=
- [PATCH v2 18/24] hw/core: Remove device_class_set_props function, Richard Henderson, 2024/12/18
- [PATCH v2 24/24] Constify all opaque Property pointers, Richard Henderson, 2024/12/18
- [PATCH v2 21/24] include/hw/qdev-properties: Shrink struct Property, Richard Henderson, 2024/12/18
- [PATCH v2 23/24] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print, Richard Henderson, 2024/12/18
- [PATCH v2 20/24] include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST, Richard Henderson, 2024/12/18
- Re: [PATCH v2 00/24] More Property cleanups, Lei Yang, 2024/12/18