From cb9f4b28ee115f14f336a4a87c593fa1685e42df Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 18 Dec 2024 07:42:40 -0600 Subject: hw/core: Introduce device_class_set_props_n Record the size of the array in DeviceClass.props_count_. Iterate with known count in qdev_prop_walk. Signed-off-by: Richard Henderson Tested-by: Lei Yang Link: https://lore.kernel.org/r/20241218134251.4724-14-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini --- hw/core/qdev.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/core/qdev.c') diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 5f13111b77..57c1d9df3a 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -703,6 +703,7 @@ static void device_class_base_init(ObjectClass *class, void *data) * so do not propagate them to the subclasses. */ klass->props_ = NULL; + klass->props_count_ = 0; } static void device_unparent(Object *obj) -- cgit 1.4.1