diff options
author | Eduardo Habkost | 2020-12-11 23:05:16 +0100 |
---|---|---|
committer | Eduardo Habkost | 2020-12-18 21:20:17 +0100 |
commit | 991f0ac90151fe1bf51a1630938041a5c5745fb9 (patch) | |
tree | f0bbb769d9f6232d4413792f681bde0f5cae6f6f /hw/core/qdev-properties.c | |
parent | qdev: Get just property name at error_set_from_qdev_prop_error() (diff) | |
download | qemu-991f0ac90151fe1bf51a1630938041a5c5745fb9.tar.gz qemu-991f0ac90151fe1bf51a1630938041a5c5745fb9.tar.xz qemu-991f0ac90151fe1bf51a1630938041a5c5745fb9.zip |
qdev: Avoid using prop->name unnecessarily
We already get the property name as argument to the property
getter and setters, we don't need to use prop->name. This will
make it easier to remove the Property.name field in the future.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20201211220529.2290218-20-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/core/qdev-properties.c')
-rw-r--r-- | hw/core/qdev-properties.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 7495798a66..50734a1cd4 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -50,7 +50,7 @@ void qdev_propinfo_get_enum(Object *obj, Visitor *v, const char *name, Property *prop = opaque; int *ptr = qdev_get_prop_ptr(obj, prop); - visit_type_enum(v, prop->name, ptr, prop->info->enum_table, errp); + visit_type_enum(v, name, ptr, prop->info->enum_table, errp); } void qdev_propinfo_set_enum(Object *obj, Visitor *v, const char *name, @@ -65,7 +65,7 @@ void qdev_propinfo_set_enum(Object *obj, Visitor *v, const char *name, return; } - visit_type_enum(v, prop->name, ptr, prop->info->enum_table, errp); + visit_type_enum(v, name, ptr, prop->info->enum_table, errp); } void qdev_propinfo_set_default_value_enum(ObjectProperty *op, |