All property code should be able to handle .name_template==NULL without problems, so we don't need to set it for array elements.
This simple change will allow us to simplify the array property registration code a lot in the next commits. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- This is a patch added in v2 of the series --- Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: "Daniel P. Berrangé" <berra...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 03cfad1e74..ad08c80e67 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -593,7 +593,6 @@ static void set_prop_arraylen(Object *obj, Visitor *v, const char *name, arrayprop->release = prop->arrayinfo->release; arrayprop->propname = propname; arrayprop->prop.info = prop->arrayinfo; - arrayprop->prop.name_template = propname; /* This ugly piece of pointer arithmetic sets up the offset so * that when the underlying get/set hooks call qdev_get_prop_ptr * they get the right answer despite the array element not actually -- 2.28.0