From patchwork Fri Mar 1 07:44:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 1050007 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 449hL944z1z9s3q for ; Fri, 1 Mar 2019 18:45:50 +1100 (AEDT) Received: from localhost ([127.0.0.1]:52437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzcrb-0006XQ-31 for incoming@patchwork.ozlabs.org; Fri, 01 Mar 2019 02:45:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzcrD-0006W5-ER for qemu-devel@nongnu.org; Fri, 01 Mar 2019 02:45:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzcrB-0001HN-O3 for qemu-devel@nongnu.org; Fri, 01 Mar 2019 02:45:23 -0500 Received: from mga18.intel.com ([134.134.136.126]:17678) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzcrA-0001GL-Ke for qemu-devel@nongnu.org; Fri, 01 Mar 2019 02:45:20 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2019 23:45:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,426,1544515200"; d="scan'208";a="121753268" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga008.jf.intel.com with ESMTP; 28 Feb 2019 23:45:17 -0800 From: Wei Yang To: qemu-devel@nongnu.org Date: Fri, 1 Mar 2019 15:44:48 +0800 Message-Id: <20190301074448.8926-1-richardw.yang@linux.intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.126 Subject: [Qemu-devel] [PATCH] qom: remove type_initialize() in object_new_with_type() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: afaerber@suse.de, Wei Yang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- 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);