* [PATCH] qom: Fix error message in object_class_property_add()
@ 2019-11-04 13:23 Greg Kurz
2019-11-04 14:06 ` Laurent Vivier
2019-11-05 14:05 ` Laurent Vivier
0 siblings, 2 replies; 4+ messages in thread
From: Greg Kurz @ 2019-11-04 13:23 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-trivial, Daniel P. Berrange, qemu-devel
The error message in object_class_property_add() was copied from
object_property_add() in commit 16bf7f522a2ff. Clarify that it is
about a class, not an object.
While here, have the format string in both functions to fit in a
single line for better grep-ability, despite the checkpatch warning.
Signed-off-by: Greg Kurz <groug@kaod.org>
---
qom/object.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/qom/object.c b/qom/object.c
index 6fa9c619fac4..d51b57fba11e 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1106,9 +1106,8 @@ object_property_add(Object *obj, const char *name, const char *type,
}
if (object_property_find(obj, name, NULL) != NULL) {
- error_setg(errp, "attempt to add duplicate property '%s'"
- " to object (type '%s')", name,
- object_get_typename(obj));
+ error_setg(errp, "attempt to add duplicate property '%s' to object (type '%s')",
+ name, object_get_typename(obj));
return NULL;
}
@@ -1139,9 +1138,8 @@ object_class_property_add(ObjectClass *klass,
ObjectProperty *prop;
if (object_class_property_find(klass, name, NULL) != NULL) {
- error_setg(errp, "attempt to add duplicate property '%s'"
- " to object (type '%s')", name,
- object_class_get_name(klass));
+ error_setg(errp, "attempt to add duplicate property '%s' to class (type '%s')",
+ name, object_class_get_name(klass));
return NULL;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] qom: Fix error message in object_class_property_add()
2019-11-04 13:23 [PATCH] qom: Fix error message in object_class_property_add() Greg Kurz
@ 2019-11-04 14:06 ` Laurent Vivier
2019-11-05 14:05 ` Laurent Vivier
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2019-11-04 14:06 UTC (permalink / raw)
To: Greg Kurz, Paolo Bonzini; +Cc: qemu-trivial, Daniel P. Berrange, qemu-devel
Le 04/11/2019 à 14:23, Greg Kurz a écrit :
> The error message in object_class_property_add() was copied from
> object_property_add() in commit 16bf7f522a2ff. Clarify that it is
> about a class, not an object.
>
> While here, have the format string in both functions to fit in a
> single line for better grep-ability, despite the checkpatch warning.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> qom/object.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index 6fa9c619fac4..d51b57fba11e 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1106,9 +1106,8 @@ object_property_add(Object *obj, const char *name, const char *type,
> }
>
> if (object_property_find(obj, name, NULL) != NULL) {
> - error_setg(errp, "attempt to add duplicate property '%s'"
> - " to object (type '%s')", name,
> - object_get_typename(obj));
> + error_setg(errp, "attempt to add duplicate property '%s' to object (type '%s')",
> + name, object_get_typename(obj));
> return NULL;
> }
>
> @@ -1139,9 +1138,8 @@ object_class_property_add(ObjectClass *klass,
> ObjectProperty *prop;
>
> if (object_class_property_find(klass, name, NULL) != NULL) {
> - error_setg(errp, "attempt to add duplicate property '%s'"
> - " to object (type '%s')", name,
> - object_class_get_name(klass));
> + error_setg(errp, "attempt to add duplicate property '%s' to class (type '%s')",
> + name, object_class_get_name(klass));
> return NULL;
> }
>
>
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] qom: Fix error message in object_class_property_add()
2019-11-04 13:23 [PATCH] qom: Fix error message in object_class_property_add() Greg Kurz
2019-11-04 14:06 ` Laurent Vivier
@ 2019-11-05 14:05 ` Laurent Vivier
2019-11-12 9:33 ` Laurent Vivier
1 sibling, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2019-11-05 14:05 UTC (permalink / raw)
To: Greg Kurz, Paolo Bonzini; +Cc: qemu-trivial, Daniel P. Berrange, qemu-devel
Le 04/11/2019 à 14:23, Greg Kurz a écrit :
> The error message in object_class_property_add() was copied from
> object_property_add() in commit 16bf7f522a2ff. Clarify that it is
> about a class, not an object.
>
> While here, have the format string in both functions to fit in a
> single line for better grep-ability, despite the checkpatch warning.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> qom/object.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/qom/object.c b/qom/object.c
> index 6fa9c619fac4..d51b57fba11e 100644
> --- a/qom/object.c
> +++ b/qom/object.c
> @@ -1106,9 +1106,8 @@ object_property_add(Object *obj, const char *name, const char *type,
> }
>
> if (object_property_find(obj, name, NULL) != NULL) {
> - error_setg(errp, "attempt to add duplicate property '%s'"
> - " to object (type '%s')", name,
> - object_get_typename(obj));
> + error_setg(errp, "attempt to add duplicate property '%s' to object (type '%s')",
> + name, object_get_typename(obj));
> return NULL;
> }
>
> @@ -1139,9 +1138,8 @@ object_class_property_add(ObjectClass *klass,
> ObjectProperty *prop;
>
> if (object_class_property_find(klass, name, NULL) != NULL) {
> - error_setg(errp, "attempt to add duplicate property '%s'"
> - " to object (type '%s')", name,
> - object_class_get_name(klass));
> + error_setg(errp, "attempt to add duplicate property '%s' to class (type '%s')",
> + name, object_class_get_name(klass));
> return NULL;
> }
>
>
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] qom: Fix error message in object_class_property_add()
2019-11-05 14:05 ` Laurent Vivier
@ 2019-11-12 9:33 ` Laurent Vivier
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2019-11-12 9:33 UTC (permalink / raw)
To: Greg Kurz, Paolo Bonzini; +Cc: qemu-trivial, Daniel P. Berrange, qemu-devel
Le 05/11/2019 à 15:05, Laurent Vivier a écrit :
> Le 04/11/2019 à 14:23, Greg Kurz a écrit :
>> The error message in object_class_property_add() was copied from
>> object_property_add() in commit 16bf7f522a2ff. Clarify that it is
>> about a class, not an object.
>>
>> While here, have the format string in both functions to fit in a
>> single line for better grep-ability, despite the checkpatch warning.
>>
>> Signed-off-by: Greg Kurz <groug@kaod.org>
>> ---
>> qom/object.c | 10 ++++------
>> 1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/qom/object.c b/qom/object.c
>> index 6fa9c619fac4..d51b57fba11e 100644
>> --- a/qom/object.c
>> +++ b/qom/object.c
>> @@ -1106,9 +1106,8 @@ object_property_add(Object *obj, const char *name, const char *type,
>> }
>>
>> if (object_property_find(obj, name, NULL) != NULL) {
>> - error_setg(errp, "attempt to add duplicate property '%s'"
>> - " to object (type '%s')", name,
>> - object_get_typename(obj));
>> + error_setg(errp, "attempt to add duplicate property '%s' to object (type '%s')",
>> + name, object_get_typename(obj));
>> return NULL;
>> }
>>
>> @@ -1139,9 +1138,8 @@ object_class_property_add(ObjectClass *klass,
>> ObjectProperty *prop;
>>
>> if (object_class_property_find(klass, name, NULL) != NULL) {
>> - error_setg(errp, "attempt to add duplicate property '%s'"
>> - " to object (type '%s')", name,
>> - object_class_get_name(klass));
>> + error_setg(errp, "attempt to add duplicate property '%s' to class (type '%s')",
>> + name, object_class_get_name(klass));
>> return NULL;
>> }
>>
>>
>>
>
> Applied to my trivial-patches branch.
>
> Thanks,
> Laurent
>
Applied to my trivial-patches branch again.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-12 9:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 13:23 [PATCH] qom: Fix error message in object_class_property_add() Greg Kurz
2019-11-04 14:06 ` Laurent Vivier
2019-11-05 14:05 ` Laurent Vivier
2019-11-12 9:33 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).