qom: use object_new_with_type in object_new_with_propv
PATCH 1/1 qom: use object_new_with_type in object_new_with_propv
Function object_new_with_propv already get the Type of the object, so we could leverage object_new_with_type here.
[make check test pass]
--- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qom/object.c +1 -1
@@ -640,7 +640,7 @@ Object *object_new_with_propv(const char *typename,error_setg (errp,"object type '%s' is abstract" , typename);return NULL ; } - obj =object_new (typename); + obj =object_new_with_type (klass->type);if (object_set_propv (obj, &local_err, vargs) <0 ) { goto error;
Signature · 1 line
2.19.1
Hi
Quoted 25 lines · Wei Yang
Function
object_new_with_propvalready get the Type of the object, so we could leverageobject_new_with_typehere.[make check test pass]
Signed-off-by Wei Yang <[email protected]>--- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qom/object.c +1
-2@@ -640,7 +640,7 @@ Object *object_new_with_propv(const char *typename,error_setg (errp,"object type '%s' is abstract" , typename);return NULL ; } - obj =object_new (typename); + obj =object_new_with_type (klass->type);if (object_set_propv (obj, &local_err, vargs) <0 ) { goto error; --
Quoted 3 lines
2.19.1
Signature · 1 line
Marc-André Lureau
Quoted 25 lines · Marc-André Lureau
Hi
Quoted 22 lines · Wei Yang
Function
object_new_with_propvalready get the Type of the object, so we could leverageobject_new_with_typehere.[make check test pass]
Signed-off-by Wei Yang <[email protected]>--- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)qom/object.c +1
-1@@ -640,7 +640,7 @@ Object *object_new_with_propv(const char *typename,error_setg (errp,"object type '%s' is abstract" , typename);return NULL ; } - obj =object_new (typename); + obj =object_new_with_type (klass->type);
Quoted 9 lines
Quoted 6 lines
qom/object.c +0
-1if (object_set_propv (obj, &local_err, vargs) <0 ) { goto error; --2.19.1
Reviewed-by Marc-André Lureau <[email protected]>
Thanks :-)
Quoted 2 lines
Signature · 1 line
Marc-André Lureau
Signature · 2 lines
Wei Yang Help you, Help me
A message that is not in the archive (sent off-list or not yet received): 20190312084313.webcenp43tk3yfmm@steredhat
Quoted 6 lines · Stefano Garzarella
Quoted 5 lines · Wei Yang
Function
object_new_with_propvalready get the Type of the object, so we could leverageobject_new_with_typehere.[make check test pass]
Quoted 8 lines
Quoted 4 lines
Signed-off-by Wei Yang <[email protected]>--- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)LGTM. Just a note for future patches:
I think that info like "[make check test pass]" should go after the three dashes to avoid to store it in the commit message.
Yes. Whoever applies should delete this line.
Quoted 1 line
Reviewed-by Stefano Garzarella <[email protected]>
Laurent Vivier
AppliedQuoted 17 lines · Markus Armbruster
Quoted 6 lines · Stefano Garzarella
Quoted 5 lines · Wei Yang
Function
object_new_with_propvalready get the Type of the object, so we could leverageobject_new_with_typehere.[make check test pass]
Quoted 8 lines
Quoted 4 lines
Signed-off-by Wei Yang <[email protected]>--- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)LGTM. Just a note for future patches:
I think that info like "[make check test pass]" should go after the three dashes to avoid to store it in the commit message.
Quoted 6 lines
Yes. Whoever applies should delete this line.
Quoted 1 line
Reviewed-by Stefano Garzarella <[email protected]>Cc qemu-trivial for merging.
Applied to my trivial-patches branch with updated commit message.
Thanks,
Laurent