From: Wei Yang <richardw.yang@linux.intel.com>
To: qemu-devel@nongnu.org
Cc: afaerber@suse.de, Wei Yang <richardw.yang@linux.intel.com>
Subject: [Qemu-devel] [PATCH] qom: remove type_initialize() in object_new_with_type()
Date: Fri, 1 Mar 2019 15:44:48 +0800 [thread overview]
Message-ID: <20190301074448.8926-1-richardw.yang@linux.intel.com> (raw)
Here is the abstraction of current call flow of object_new_with_type()
object_initialize_with_type
type_initialize
object_initialize_with_type
type_initialize
This is not necessary to spread type_initialize in two places.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
qom/object.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/qom/object.c b/qom/object.c
index b8c732063b..6252cca418 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -585,7 +585,6 @@ static Object *object_new_with_type(Type type)
Object *obj;
g_assert(type != NULL);
- type_initialize(type);
obj = g_malloc(type->instance_size);
object_initialize_with_type(obj, type->instance_size, type);
--
2.19.1
next reply other threads:[~2019-03-01 7:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 7:44 Wei Yang [this message]
2019-03-01 9:33 ` [Qemu-devel] [PATCH] qom: remove type_initialize() in object_new_with_type() Igor Mammedov
2019-03-02 11:38 ` Wei Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190301074448.8926-1-richardw.yang@linux.intel.com \
--to=richardw.yang@linux.intel.com \
--cc=afaerber@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.