From patchwork Tue Oct 29 08:59:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6B50D5B16B for ; Tue, 29 Oct 2024 08:44:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hp9-0002zm-1r; Tue, 29 Oct 2024 04:43:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp6-0002yO-OD for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:32 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp4-000823-Ab for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191410; x=1761727410; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=18pQ9+SfnSigWSBylZF9eBI8bbh5P/JEEPJ4cx3fM/A=; b=VR6GhBUiM5QBLvXtx5ChGYQ/On7FnATKKQN83oDZZwfueA6SsIgqiAC/ Oh3TlQqgeltQIrw5dxDFSA74mIvqzrBy3YATVKl6jyaPUsUE0yAu/ExKA LtaxW3Dxf8WF3DmXNqNTR88nkQjBv/fgJPHXuug0E4B+i/uubbF4PsBXw oCMuDyQgTq7clz4Sh4JJgdvou121iF2YJorXdGthBcZkL2CZFolpK4Nc0 kU9q4oCt1c2bGZ2RoDlLoyXPpMN0yZt9/Wa9VmzbGcrfVmYdtGwJ76KGE rWB21t76/Dc4DLr8FZl0Gt0/XRWgpJFpWE8Oxy+KjCkHp6dZ1wbbEgS0y w==; X-CSE-ConnectionGUID: bXbGLT+nQB6dFtb6zBLrsQ== X-CSE-MsgGUID: ekISJSmsS7iE15cF/v3zNg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592770" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592770" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:25 -0700 X-CSE-ConnectionGUID: q1TPc99zQ6OUBM19J8sHfQ== X-CSE-MsgGUID: +VW8Tz3wRAmRqD2ApeHdjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847110" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:24 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 01/16] arm: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:19 +0800 Message-Id: <20241029085934.2799066-2-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/arm/armsse.c | 2 +- hw/arm/smmuv3.c | 4 ++-- target/arm/cpu.c | 2 +- target/arm/cpu64.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 255346a595a7..58ed504b2bc3 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -1731,7 +1731,7 @@ static void armsse_register_types(void) .class_init = armsse_class_init, .class_data = (void *)&armsse_variants[i], }; - type_register(&ti); + type_register_static(&ti); } } diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 4c49b5a885f1..6e847e8773d8 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -2065,8 +2065,8 @@ static const TypeInfo smmuv3_iommu_memory_region_info = { static void smmuv3_register_types(void) { - type_register(&smmuv3_type_info); - type_register(&smmuv3_iommu_memory_region_info); + type_register_static(&smmuv3_type_info); + type_register_static(&smmuv3_iommu_memory_region_info); } type_init(smmuv3_register_types) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 1320fd8c8fea..38ad3fcacd33 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2738,7 +2738,7 @@ void arm_cpu_register(const ARMCPUInfo *info) }; type_info.name = g_strdup_printf("%s-" TYPE_ARM_CPU, info->name); - type_register(&type_info); + type_register_static(&type_info); g_free((void *)type_info.name); } diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 458d1cee0120..c1cac912a088 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -841,7 +841,7 @@ void aarch64_cpu_register(const ARMCPUInfo *info) }; type_info.name = g_strdup_printf("%s-" TYPE_ARM_CPU, info->name); - type_register(&type_info); + type_register_static(&type_info); g_free((void *)type_info.name); } From patchwork Tue Oct 29 08:59:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854489 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CCD60D5B16B for ; Tue, 29 Oct 2024 08:45:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hp8-0002zb-NU; Tue, 29 Oct 2024 04:43:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp6-0002yQ-Qg for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:32 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp5-00082C-5K for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191411; x=1761727411; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yIyb1abKVnDFJMflWs366PCqnWxkWmaMhCPGF5VbeKc=; b=cXqOJNS6Rhgtp2CDX52QQ5j3sk6xanATw3g47cObUvju7PJn2lCp4H8/ /koLJvWyK820nWPvFSe9XNbPCiBy1+7lhWwxFFYjcB/nmUpEP6AeCTCJM y/0xg9cBQVr9g3D/6/9OXL1ll1k3Y7Yr50Ory61LAmUmMcZ2JAtY7MO3S zuIBN/PIl0UNkX3l3/sxTTPFoya/Md+w7B7o8CXOQU5vvcKj9cjtt4hJU NQDw0TE2eKax1p4p5wrrD17fk0cumWQScE0Of0pQ9MESW59M+IpC0mHEV ABocYuTTq0DJowVHXyOn8lFiGeS2mlALEV+5vJlDgmG12cgMMcCyj60Wn w==; X-CSE-ConnectionGUID: /ZtrOBH1SyGwUCQ9oN0Frw== X-CSE-MsgGUID: Zn38FSwCTtaBiN7PiTSnWA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592774" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592774" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:27 -0700 X-CSE-ConnectionGUID: 6vq/QPBkRbG/5rlI1kn72Q== X-CSE-MsgGUID: lOZi8fveSjegZ71TBuSZKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847119" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:25 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 02/16] hw/block: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:20 +0800 Message-Id: <20241029085934.2799066-3-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/block/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index e2e84f8b5f8d..748594524e3f 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -1894,7 +1894,7 @@ static void m25p80_register_types(void) .class_init = m25p80_class_init, .class_data = (void *)&known_devices[i], }; - type_register(&ti); + type_register_static(&ti); } } From patchwork Tue Oct 29 08:59:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854482 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 792EED5B16B for ; Tue, 29 Oct 2024 08:44:52 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hp9-0002zp-2k; Tue, 29 Oct 2024 04:43:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp7-0002yu-RD for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:33 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp5-00081u-TY for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191412; x=1761727412; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0iSoAeOpi77343UM4NHKAfHRqjgggjq71Vzm1FN1fVU=; b=Y1FCfDF4lqH23nzWnN9vzpMPbl2OH4cLnAsb08j2I7TQfGhhNxVFYfoZ r9xgn91c0vPjlIAYoqTwhihI5XZtp9JSjtZSF9cXF2TS27ugmuB1qH7aY u4BN9OXBi1jbp18809pm8slef+DnUUSpJhvVQVuUhRdVKe+Z/O7PQOoLL y5iOm0XkH/DfyHlJL8uzzUjcpy6CxvaxWUsQNcH2Tu9hiqB0Py7VLR7ah gC0KaioG+5dHdx2I3bMKJszEnnYTUlKnuxxLOTBCHVNw+c2bsgVHgVIBM Y7fBIA7/aIt6T45lzKov9Lc3qeH4c9/TiGXpatWtsHZDsdLWuwkm7Pk3u g==; X-CSE-ConnectionGUID: sIOhjz9PQ0GUctj+FKiOmQ== X-CSE-MsgGUID: HUXkKN8ORiy/lFepz9VYsw== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592778" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592778" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:29 -0700 X-CSE-ConnectionGUID: DtW0M8zzQ/ChAt8c6UB5YA== X-CSE-MsgGUID: +LreawYARICLdD0xgwbURA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847132" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:27 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 03/16] hw/net: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:21 +0800 Message-Id: <20241029085934.2799066-4-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/net/e1000.c | 2 +- hw/net/eepro100.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 5012b964640d..ab72236d1831 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1774,7 +1774,7 @@ static void e1000_register_types(void) type_info.class_data = (void *)info; type_info.class_init = e1000_class_init; - type_register(&type_info); + type_register_static(&type_info); } } diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index c8a88b9813f0..20b22d8e49cb 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -2102,7 +2102,7 @@ static void eepro100_register_types(void) { }, }; - type_register(&type_info); + type_register_static(&type_info); } } From patchwork Tue Oct 29 08:59:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 22409D5B16B for ; Tue, 29 Oct 2024 08:44:56 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpB-00030X-A6; Tue, 29 Oct 2024 04:43:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp9-0002zs-1x for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:35 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp7-00082C-6Y for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191413; x=1761727413; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3szCOy0+zAlrtzzT6GSA9q6eiS5v3qx/Ef32mg+t+JM=; b=Y/NFllQd3phUcs7L3ewCDBH+P7/Jhrn3ct36+HwGxU4bCdVYSDoMgpF7 XPfl5mxak/W4Rg9YMY+NwQm9LSdvEoXu8vHmuy/pIalX4AHSimjHrwD0W DWXCGqJYk0HMpblyhvx6Vk6yZpOY5m3wg6QoLpOhJcRac+ZSZNp3INSyk JDwyUCLLZ6pYWTaqqlM0HFMd5+Iubf7ILRwDFWBk2zD6mL97HXMTiKUQJ VQAw3HbTB4AKRZum9P+HCCFcREelHdkFxzSgmC1C8eT8OTRoyECE02HhQ LRjGRgzpl/WrD1AGf47xnvh7VPuGLWQeiaAKfGg2OAXvPH+c8DxnMkh6C A==; X-CSE-ConnectionGUID: 8BiaZvViTlegTASLCp0xkA== X-CSE-MsgGUID: p2SekVdDRTu5hGMldD8mRQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592782" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592782" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:30 -0700 X-CSE-ConnectionGUID: 2D+cpfsrS9GmG97DdBOg+g== X-CSE-MsgGUID: dqC65bORQYqF5fXYEXSVIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847163" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:28 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 04/16] ppc: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:22 +0800 Message-Id: <20241029085934.2799066-5-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/ppc/spapr.c | 2 +- target/ppc/kvm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2c10a70a48ee..81bc4c5c44c1 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4826,7 +4826,7 @@ static void spapr_machine_latest_class_options(MachineClass *mc) static void MACHINE_VER_SYM(register, spapr, __VA_ARGS__)(void) \ { \ MACHINE_VER_DELETION(__VA_ARGS__); \ - type_register(&MACHINE_VER_SYM(info, spapr, __VA_ARGS__)); \ + type_register_static(&MACHINE_VER_SYM(info, spapr, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, spapr, __VA_ARGS__)) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 3efc28f18b39..0d464824dbcb 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2633,7 +2633,7 @@ static int kvm_ppc_register_host_cpu_type(void) return -1; } type_info.parent = object_class_get_name(OBJECT_CLASS(pvr_pcc)); - type_register(&type_info); + type_register_static(&type_info); /* override TCG default cpu type with 'host' cpu model */ object_class_foreach(pseries_machine_class_fixup, TYPE_SPAPR_MACHINE, false, NULL); From patchwork Tue Oct 29 08:59:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17707D5B16B for ; Tue, 29 Oct 2024 08:45:01 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpB-00030T-9n; Tue, 29 Oct 2024 04:43:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp8-0002zl-PE for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:34 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp7-000823-6Y for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191413; x=1761727413; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9kYnldw41cJdWUJuuIJhFYvlphLmKS447wGYWCEh280=; b=Fe/kRe2K8Mo9U1Vciu6ez9pICJH71uwIT0IKtT1PjJu6WO8E7HCR2+FX KyOELW1B6/gsINqKIk6FRlKM1Wxk1lv5f5ujZFxm1grcXveIzvaaUeGTT IhBKTycftA3cXz25FBcvNsszF5zIpwGCthzvB/uom1ZsRINuCOHdFH4fL uI/2nARR4SZUAL/zSevd1zbWEu+c7btPmk7M1JcqVV0PkBQDr+5vX5VgE o405WTSZjn91BAUvszmLsQj/IA9/Unkr2ZyoBerwQCQK8VKD3EHY7hseU q5z9L2TqnqeFO41T1MLPqtFRx1M/zWpqCTjGWvfMbmmjk0nhI5O376sUo Q==; X-CSE-ConnectionGUID: DjhvNda7TJuzgNKew4Uszw== X-CSE-MsgGUID: JAGEyqAzQza38rpQqAsiuA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592796" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592796" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:32 -0700 X-CSE-ConnectionGUID: 9S+eylurSzW+pqDejO0eqg== X-CSE-MsgGUID: NdJHCqV0Siyxz8H5h9x68g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847167" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:30 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 05/16] hw/rtc: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:23 +0800 Message-Id: <20241029085934.2799066-6-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/rtc/m48t59-isa.c | 2 +- hw/rtc/m48t59.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rtc/m48t59-isa.c b/hw/rtc/m48t59-isa.c index 6e9723fdf19f..b642b82680d8 100644 --- a/hw/rtc/m48t59-isa.c +++ b/hw/rtc/m48t59-isa.c @@ -161,7 +161,7 @@ static void m48t59_isa_register_types(void) for (i = 0; i < ARRAY_SIZE(m48txx_isa_info); i++) { isa_type_info.name = m48txx_isa_info[i].bus_name; isa_type_info.class_data = &m48txx_isa_info[i]; - type_register(&isa_type_info); + type_register_static(&isa_type_info); } } diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c index 48846d8df409..90299ea56fe3 100644 --- a/hw/rtc/m48t59.c +++ b/hw/rtc/m48t59.c @@ -679,7 +679,7 @@ static void m48t59_register_types(void) for (i = 0; i < ARRAY_SIZE(m48txx_sysbus_info); i++) { sysbus_type_info.name = m48txx_sysbus_info[i].bus_name; sysbus_type_info.class_data = &m48txx_sysbus_info[i]; - type_register(&sysbus_type_info); + type_register_static(&sysbus_type_info); } } From patchwork Tue Oct 29 08:59:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854495 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EDA9D5B164 for ; Tue, 29 Oct 2024 08:46:21 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpD-00031N-8M; Tue, 29 Oct 2024 04:43:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp9-00030B-RR for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:35 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hp8-00081u-69 for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191414; x=1761727414; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2A5Haq33d7m1AJtNI3w75MshOhOiNodMu4lutbKPFLg=; b=CG9PVb+GcRSCAVshL/3Ch26wTV1/vnKGSXK164MpdNkkN+H9GOsapB0y zPLd32tFl3J2TzNeh9nuvgR5gNMCTBIe0UTgFcrAKMIpkn/hPpvWHi6Ev 9UDViP34mM2Mls6WdVfKaI/eJEizg5CexDfXDKhEcSHMfPTAxapQ11LlA rWu0RBea77QY8/Dv5ScnV/sh31PmjkSk0GZIzbc3rRDBvzUd9e2NYpFYB O17hH8W4KoEtgumvXXr7Z1FD+cTe86o3QHIUJ9MIM76WJhoUefk2n2sCB z0JffSiyUdlgMWMyLfu62VzHeZl2niAI/PCG8JTWJRPcvMsLHJa3Y5Zl/ w==; X-CSE-ConnectionGUID: lQfL1ipNQNuk9XDU+GR8sA== X-CSE-MsgGUID: 9hKntnrLR1aC7Y2hNPr3ig== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592799" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592799" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:33 -0700 X-CSE-ConnectionGUID: 1HaF+PFOR3S9Z3x7B4yr6g== X-CSE-MsgGUID: 8cduvls7RO+cgaCGOguJYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847177" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:31 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 06/16] hw/scsi: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:24 +0800 Message-Id: <20241029085934.2799066-7-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because\ type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/scsi/megasas.c | 2 +- hw/scsi/mptsas.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 221b06d6aaf6..b72d2f8cdf39 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2586,7 +2586,7 @@ static void megasas_register_types(void) type_info.class_init = megasas_class_init; type_info.interfaces = info->interfaces; - type_register(&type_info); + type_register_static(&type_info); } } diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c index 361b75e633ae..c6bc3479e997 100644 --- a/hw/scsi/mptsas.c +++ b/hw/scsi/mptsas.c @@ -1450,7 +1450,7 @@ static const TypeInfo mptsas_info = { static void mptsas_register_types(void) { - type_register(&mptsas_info); + type_register_static(&mptsas_info); } type_init(mptsas_register_types) From patchwork Tue Oct 29 08:59:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8DA68D5B16F for ; Tue, 29 Oct 2024 08:45:15 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpF-000325-Cj; Tue, 29 Oct 2024 04:43:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpC-000310-LR for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:38 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpB-00081u-2f for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191417; x=1761727417; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Rnz6R4FgIlH4YI0tBu1NrnmfxYTvCccvvkVAtxUSMQE=; b=eNbNrMaaZiuhWK1sGZDTm7SVMmCXrdXzwfCehYIweGxISn2shMOwrB+y Whlp3zr599XtuMRQsAKqP7rlnrvY/gCz3M7yfyAKPXvusyVj6f7dtqpxH oqXs5z/TgdRVosreZB6g6M8DC9iYAs9/WNZIHTyuB19el2FBPyWccvnye 6eFW4mLBckXDz5qi4qdK80sczWSRBnybsi1nYODtVkqJp+MhbRCvYlgRO f7dgMKbePlwpZCPh4SYDQLizSYAVev/6W5SqNChk6AG6OnX+pUBuQyz+j bOX2KIspZ2jzvB36cZuLMsPqslXDiW+MrK6EolfiwCbFN9Pg0/qC2Q7CK w==; X-CSE-ConnectionGUID: FnKqjB4tSVOxzWHweLW0FA== X-CSE-MsgGUID: QlLNunbjQh6zVjHQjMV/Hg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592802" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592802" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:35 -0700 X-CSE-ConnectionGUID: vxj9VGx9R4ia+Yd8Z5qx4g== X-CSE-MsgGUID: UxiJgwwGRf2HtJAVLYq2MQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847182" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:33 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 07/16] hw/sensor: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:25 +0800 Message-Id: <20241029085934.2799066-8-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/sensor/tmp421.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sensor/tmp421.c b/hw/sensor/tmp421.c index b6f0b62ab11b..82e604279c5a 100644 --- a/hw/sensor/tmp421.c +++ b/hw/sensor/tmp421.c @@ -384,7 +384,7 @@ static void tmp421_register_types(void) .class_init = tmp421_class_init, .class_data = (void *) &devices[i], }; - type_register(&ti); + type_register_static(&ti); } } From patchwork Tue Oct 29 08:59:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75A80D5B16F for ; Tue, 29 Oct 2024 08:45:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpG-00032j-I8; Tue, 29 Oct 2024 04:43:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpD-00031U-Ag for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:39 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpB-00083O-MW for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191418; x=1761727418; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=b3ghL1kjS2+0w0jZmmgjLxWWfkCh8dYffVl5sBe8rfI=; b=feip1Mb2T8TEkpwLouXBY2ksVz6LobRsyTU6ar0Oe6TWVVFdWKqOEUCQ bcUGd3QAe9JXSwNgpnZs8Zay9BYppytBQCCUdXo7hA9W3GHCk9E5KovxZ xTPUT4Tcy4Cj8R+W5X65+wKkDONWxt9kfN4/P9nHNGiDu6WA5UyTMC577 aeqwduv6TzdcuM/AVHIyS5P6RbMuUeeRfro+6bLfmsycQXIlgsmjTPCf/ 98ezze+VjTI/SuDVRt097y5G+0FE7hQPHSYT8dVuyvyDMwpv3ROrHCKEG GEtTxS0UtZ27S6XvSpQtCTCztwUzmCyH+hjvzUXvPijrcUVUaUdxsuYck g==; X-CSE-ConnectionGUID: Zxq2saP5SMi2dG/CyV87Yw== X-CSE-MsgGUID: Bwg9dMbURsC5yWR+0JjPeQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592807" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592807" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:36 -0700 X-CSE-ConnectionGUID: Gw1v7kf4RcOYYIbVXgxJOg== X-CSE-MsgGUID: Ume+FI35ThWzhNDLcrc3Ng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847193" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:35 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 08/16] hw/usb: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:26 +0800 Message-Id: <20241029085934.2799066-9-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/usb/hcd-ehci-pci.c | 2 +- hw/usb/hcd-uhci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c index c94fc9f6c587..dd06451e234f 100644 --- a/hw/usb/hcd-ehci-pci.c +++ b/hw/usb/hcd-ehci-pci.c @@ -228,7 +228,7 @@ static void ehci_pci_register_types(void) for (i = 0; i < ARRAY_SIZE(ehci_pci_info); i++) { ehci_type_info.name = ehci_pci_info[i].name; ehci_type_info.class_data = ehci_pci_info + i; - type_register(&ehci_type_info); + type_register_static(&ehci_type_info); } } diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 3d0339af7b9e..65c1f93cc9f3 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1362,7 +1362,7 @@ static void uhci_register_types(void) for (i = 0; i < ARRAY_SIZE(uhci_info); i++) { uhci_type_info.name = uhci_info[i].name; uhci_type_info.class_data = uhci_info + i; - type_register(&uhci_type_info); + type_register_static(&uhci_type_info); } } From patchwork Tue Oct 29 08:59:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A4F8D5B16B for ; Tue, 29 Oct 2024 08:45:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpG-000326-0J; Tue, 29 Oct 2024 04:43:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpE-00031u-OX for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:40 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpD-00083P-4N for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191419; x=1761727419; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tK36CO+mnwx3UfyesQ659HajFWB+D+B7nljlDYn8dyc=; b=Lwf2ewuN+ye2TJG7+fxMZBNMkBMo+8YLbnrY9NDmucWSl4FhpuWig0Sz gHrvc5Xo0RclFS2XvkNrnN8sCDwhe3fc33ZQsYaHF7Q40NToXg9OrM0vm ltSs8wlOGs5kiCey32+SnF7wd+y3YNEU0vrwhKFFnF+IlQ3X/NxaTq+Hm CtefNbPWPnNHyGf3QhqPq0Il1D7BpVfJj91njaXyB62qL86aJQwInbXGO jgdGr6/jWG0eADC82ZUEojxQQCKj0YStrMNA9LlYu8boulCZc8OxTkhtb KBo7G1HpokD+P9wY89Zc6rDAzlv8qQs/RI4xAK9tfEOw2YUyRcm27QOfC w==; X-CSE-ConnectionGUID: 09NR5Z4rRLebWwUI32frrg== X-CSE-MsgGUID: fD83p55JR0Sj1NLyPNWGIg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592813" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592813" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:38 -0700 X-CSE-ConnectionGUID: VP1IhmV/QtCkcdo/miMBew== X-CSE-MsgGUID: lorqoSSvRsi8MKm63yTs7g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847198" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:36 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 09/16] hw/virtio: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:27 +0800 Message-Id: <20241029085934.2799066-10-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- hw/virtio/virtio-pci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4d832fe8455d..21ff7c5f6a9f 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2492,9 +2492,9 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t) base_type_info.class_data = (void *)t; } - type_register(&base_type_info); + type_register_static(&base_type_info); if (generic_type_info.name) { - type_register(&generic_type_info); + type_register_static(&generic_type_info); } if (t->non_transitional_name) { @@ -2508,7 +2508,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t) { } }, }; - type_register(&non_transitional_type_info); + type_register_static(&non_transitional_type_info); } if (t->transitional_name) { @@ -2525,7 +2525,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t) { } }, }; - type_register(&transitional_type_info); + type_register_static(&transitional_type_info); } g_free(base_name); } From patchwork Tue Oct 29 08:59:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DBEBD5B164 for ; Tue, 29 Oct 2024 08:45:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpI-00033C-IG; Tue, 29 Oct 2024 04:43:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpG-00032b-BA for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:42 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpE-000848-QE for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191421; x=1761727421; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=43WK+abTbNMifGNpLd4Svq5BTo5rTuY6AzMRimA/3NA=; b=AQ9FLfIV4uASuw7fmo3qjAsAQsPv8p5PEkXXbNdxT13bGZHypF+rSTcC UOzEoBRk+06dbJuHrv9IFEpCXRL5wNXvdvor6leFGbyUTeOIwG7Pxgt97 bGcquQiVZAAQ/XK6Ps9C33GXgb4AsBajWNguENhyGhH7itwNPoVE6msM4 qn/EB4zS4kzY6LfjwGydNFvYAuSRPSZDvw/e+oTWa8aC8EYOMBqdtuAjH /KtXdUZKoKLUtOQUyqQS5HxNDMVwYFHhgizkftC1sF9lo4K6sTn5ABZiF 0LovX17htJlv3YQvZTWDdO3TSdfySSQZUOgHr2X3pkvJmRfKcMpsbbjh3 w==; X-CSE-ConnectionGUID: 6gcS49eTQTCmLMIHhKA6Mg== X-CSE-MsgGUID: /tb8305eQJWrcO5NzpcZhQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592817" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592817" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:39 -0700 X-CSE-ConnectionGUID: 0fZAUPKqRASBD1NDMbj68Q== X-CSE-MsgGUID: 68T131g+S+eyD/L3pN12nA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847208" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:38 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 10/16] i386: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:28 +0800 Message-Id: <20241029085934.2799066-11-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- include/hw/i386/pc.h | 4 ++-- target/i386/cpu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 14ee06287da3..b3477ad6a291 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -316,7 +316,7 @@ extern const size_t pc_compat_2_3_len; }; \ static void pc_machine_init_##suffix(void) \ { \ - type_register(&pc_machine_type_##suffix); \ + type_register_static(&pc_machine_type_##suffix); \ } \ type_init(pc_machine_init_##suffix) @@ -344,7 +344,7 @@ extern const size_t pc_compat_2_3_len; static void MACHINE_VER_SYM(register, namesym, __VA_ARGS__)(void) \ { \ MACHINE_VER_DELETION(__VA_ARGS__); \ - type_register(&MACHINE_VER_SYM(info, namesym, __VA_ARGS__)); \ + type_register_static(&MACHINE_VER_SYM(info, namesym, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, namesym, __VA_ARGS__)); diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 1ff1af032eaa..241bbef5d60b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6347,7 +6347,7 @@ static void x86_register_cpu_model_type(const char *name, X86CPUModel *model) .class_data = model, }; - type_register(&ti); + type_register_static(&ti); } From patchwork Tue Oct 29 08:59:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854490 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 70F01D5B164 for ; Tue, 29 Oct 2024 08:45:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpS-00033w-4Z; Tue, 29 Oct 2024 04:43:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpR-00033i-6k for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:53 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpP-00083P-Eg for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191431; x=1761727431; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fzNuBXULCODz/FU9wq/GkP4Ss2qGsps+MsRx2BwEg6s=; b=Wx9FtCI5UtZ5tX/FMKo22AlKdnJdclS7JpsgJRAkCbDIAvQ4ysu1SSlW ITeIW30YRCvGwrA0iAibS8UgPRG91O2Le8YN72B5V40JyOTF1rlnmK/dz nDJlHWRC6mFAWDSlzcVi3O9SD1T2hBJ083s2KmVZLuAZ3yMDpb0m0L/LA hiu6R3/5MlY3FEwRyrfotAVjab+vCpbWbWT1b+cDEGwlvHLSxaoVauDfj HNiu9UavRYxY3P6lbs/laOZlV2okebZ5SFBBfda1patDZMQnaV7/gQl6B NkpLYAl5GO2/PZ9ckzQyiEwyemXKkKtDW7LN6MTefr2nVXLU5b01L9wgq Q==; X-CSE-ConnectionGUID: Yu3o6vtoTd2Z39kHnJYWcw== X-CSE-MsgGUID: CmqGR7IATMO+HocZIkSsEg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592822" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592822" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:41 -0700 X-CSE-ConnectionGUID: ifxcJGuySaClaF603DHHiA== X-CSE-MsgGUID: GHzK+cUrQmuXRIFtrIu8tg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847213" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:39 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 11/16] target/mips: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:29 +0800 Message-Id: <20241029085934.2799066-12-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- target/mips/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 9724e71a5e0f..80ad4ae1084c 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -626,7 +626,7 @@ static void mips_register_cpudef_type(const struct mips_def_t *def) .class_data = (void *)def, }; - type_register(&ti); + type_register_static(&ti); g_free(typename); } From patchwork Tue Oct 29 08:59:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854496 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F3DAD5B16B for ; Tue, 29 Oct 2024 08:46:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpV-00034e-7V; Tue, 29 Oct 2024 04:43:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpT-00034N-Hn for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:55 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpS-000848-2S for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191434; x=1761727434; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Bg5maz9r6esN8mOcyPsxhwPKeGRYq/RWrV44SW6Ow9M=; b=fhxfUWGRr3bKuJLGuXnDGoc4fAUilKJKNAplGpqG1HX+j2+EmbWPSUuL cIb7jsPpsom0vscZqVtWR1Oq1yN7+2gk5KgQbSyfrrvQ31HPV/I0g7DdV 5wVRkXxCqdHG1AjK55nSxQxqkwPT3FKhT2DR/lcG4VbpEaa3NSYRty7MX BKkHTtT85itC6nZPf7RuegGS1y2UN0iO7rd/ZRgVpDw9Dl0FV797zzkXG ow/EEB+TFe08ve6bN1ccAbMysPlPhjw6dfls/RK7fYIV9J4ZczwkxSO4g f1sUiUvfMx5giAd8aPICgtoAn5p8+hh/XIUKMYXr0yBTcFpmEbDoi2Ezs Q==; X-CSE-ConnectionGUID: UKFQ785VQeWG3Nnww8bQQw== X-CSE-MsgGUID: p6Njco9zSmCOK1fnXK2lsA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592826" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592826" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:42 -0700 X-CSE-ConnectionGUID: YBhkgr+LQ/+nG7zPsdXyrQ== X-CSE-MsgGUID: G/NBFFzJRJ+LW6X7wFPUIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847217" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:41 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 12/16] target/sparc: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:30 +0800 Message-Id: <20241029085934.2799066-13-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- target/sparc/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 54cb269e0af1..f784b84ddd91 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1000,7 +1000,7 @@ static void sparc_register_cpudef_type(const struct sparc_def_t *def) .class_data = (void *)def, }; - type_register(&ti); + type_register_static(&ti); g_free(typename); } From patchwork Tue Oct 29 08:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CC9CD5B16B for ; Tue, 29 Oct 2024 08:45:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpW-000350-NX; Tue, 29 Oct 2024 04:43:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpV-00034n-Dn for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:57 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpT-00084o-Jb for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:43:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191436; x=1761727436; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q27tShPjg+XTXhgkfZZQgStLn96wPei7nUviWn4ZH2w=; b=N6aaS6WsjhDxm2DZhel4Io0tH4KAZPLG56Gd7zh5atrkkT9kq9mBRjgI 13JapUkU50vZpWicW4rK/t5ueZDPZtnSJhPknpMPy31mrvaGYWzdqAqVZ Dx+7i7WbjuyT/berrfxDIqdhaHgqvkGfo8J5NVyOIYnWNNRuQBcZmMkax 32MtUzyS83mN0M/BkHr5fYvAonYCi7FLM4SsPSpQ7lXQ3u0gcyMQ/VM8k GLIyy+/hIKZKIrUkFvaV1i1q1skO7ojSqM/sK4YSbcTdAlLulXqCyToXI +wmFGPPe3G0Ld23kxy07wJ7ItITNWEPSgoOqZZq4bv0Z1YoKXlvC4GZaj Q==; X-CSE-ConnectionGUID: gKiG8XX3Rd61jTzAfCnTww== X-CSE-MsgGUID: buHepiFgQ56msxAQyAO+aw== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592829" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592829" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:44 -0700 X-CSE-ConnectionGUID: RTtDknDSTvKXLxPiR5fi5Q== X-CSE-MsgGUID: My0Y86LpQ3ChBSJcYNJZQQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847224" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:42 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 13/16] target/xtensa: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:31 +0800 Message-Id: <20241029085934.2799066-14-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- target/xtensa/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index ca214b948a96..2978c471c1fc 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -198,7 +198,7 @@ void xtensa_register_core(XtensaConfigList *node) node->next = xtensa_cores; xtensa_cores = node; type.name = g_strdup_printf(XTENSA_CPU_TYPE_NAME("%s"), node->config->name); - type_register(&type); + type_register_static(&type); g_free((gpointer)type.name); } From patchwork Tue Oct 29 08:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854494 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95E5ED5B16B for ; Tue, 29 Oct 2024 08:46:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpf-000380-Aw; Tue, 29 Oct 2024 04:44:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpd-00035U-Cp for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:44:05 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpb-00083P-Kv for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:44:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191444; x=1761727444; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fPJOO4j7DoNvl7atZ840KrayE9ekf6SO5xM1CH2yL+I=; b=UcEC+DbVmUw0Ebha1aLNEZcZZjPnwU6FYxN2fVw3tGdeSw4rf2E/XKKi fTPjfu0Rj6lmDVeBDSkX18Ibg+5GIxVQ9B04Jpx+v4fXbmVaLORua2zde BAI2YDyFQCdqPlZW/ZggLf2RicPVfJJazTvNBJldTBiF/DLR/UkjgCIQ8 d8LJOnOlSHHQl5IsHYsqSX6rRtp5Q8nSdaT2mzr09yG1w2CrO8uw6KnT2 F0WubDaM+rYUWzP70ffKQRC67QEu+QMYq1juIm4hGs4h3qtxb/A1/FUIT HjOljvogAJByKZRT7PoKu0uzc2KKn/0dQA8r7irh7bgv4wycB0SYPmJD4 A==; X-CSE-ConnectionGUID: 2WKNelnESJyhcHFPYvAf0w== X-CSE-MsgGUID: mIUyw5FGQa6xuypj4JK0yQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592833" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592833" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:45 -0700 X-CSE-ConnectionGUID: v+D8dni6R8WYFl2qgxwOHQ== X-CSE-MsgGUID: CKURs3kJSMOtCom4I8n6+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847231" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:44 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 14/16] ui: Replace type_register() with type_register_static() Date: Tue, 29 Oct 2024 16:59:32 +0800 Message-Id: <20241029085934.2799066-15-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Replace type_register() with type_register_static() because type_register() will be deprecated. Signed-off-by: Zhao Liu --- ui/console-vc.c | 2 +- ui/dbus.c | 2 +- ui/gtk.c | 2 +- ui/spice-app.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/console-vc.c b/ui/console-vc.c index 53fcee88f4ac..fe20579832a5 100644 --- a/ui/console-vc.c +++ b/ui/console-vc.c @@ -1073,6 +1073,6 @@ void qemu_console_early_init(void) { /* set the default vc driver */ if (!object_class_by_name(TYPE_CHARDEV_VC)) { - type_register(&char_vc_type_info); + type_register_static(&char_vc_type_info); } } diff --git a/ui/dbus.c b/ui/dbus.c index 7ecd39e784a9..d60b59cc5462 100644 --- a/ui/dbus.c +++ b/ui/dbus.c @@ -476,7 +476,7 @@ early_dbus_init(DisplayOptions *opts) #endif } - type_register(&dbus_vc_type_info); + type_register_static(&dbus_vc_type_info); } static void diff --git a/ui/gtk.c b/ui/gtk.c index bf9d3dd679a1..f9a53ea78ed7 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2540,7 +2540,7 @@ static void early_gtk_display_init(DisplayOptions *opts) keycode_map = gd_get_keymap(&keycode_maplen); #if defined(CONFIG_VTE) - type_register(&char_gd_vc_type_info); + type_register_static(&char_gd_vc_type_info); #endif } diff --git a/ui/spice-app.c b/ui/spice-app.c index a10b4a58fe74..2a93ae591846 100644 --- a/ui/spice-app.c +++ b/ui/spice-app.c @@ -173,7 +173,7 @@ static void spice_app_display_early_init(DisplayOptions *opts) exit(1); } - type_register(&char_vc_type_info); + type_register_static(&char_vc_type_info); sock_path = g_strjoin("", app_dir, "/", "spice.sock", NULL); qopts = qemu_opts_create(list, NULL, 0, &error_abort); From patchwork Tue Oct 29 08:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B32EBD5B164 for ; Tue, 29 Oct 2024 08:46:00 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpj-0003A7-B9; Tue, 29 Oct 2024 04:44:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpf-000383-EP for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:44:07 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpd-000848-TA for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:44:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191446; x=1761727446; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aMSKVSsDVHQPhtuOVweaXCvBB+2RwCjvpnBmbD6sagg=; b=NnqrmuYC+jfCIWE1UN1Bjn4ejchZ6a9WS2pvGHJi1YGxc/d98lchGWef gJiC3e+kxgbyFbeMKfIAfgJOeL2e9uT4GBotChkVAicRlhU5Wdb8dvQXd HURVfO9XXO5CbUo41DSbGc4yhUqI5sxdCf/b/j4qy7sv0cJuw3BD1s7lF YHioTkbPA7ntSmQGCyfGfwobwarKEe5SBU85v25eMCvCGg9fUDQb90k15 6PtEJnDfeNIuCvL1WxTgQK+m65DtLd3ShtpgTGOnd6z6GXdAUiuPKziit WR8HMZEaCpsuR+IDqIkzIzxGx/mVEXJn8eMcR1IZblta5CRpeT10VT0hG w==; X-CSE-ConnectionGUID: GqDU1yTiT+iX0DProNv70w== X-CSE-MsgGUID: r4PoZX8WTMq+lthk3m01bA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592837" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592837" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:47 -0700 X-CSE-ConnectionGUID: FWktUwy0QaGmm0T+ME1n+Q== X-CSE-MsgGUID: +wkPxCN/TAu2qBXivemaeA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847239" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:45 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 15/16] script/codeconverter/qom_type_info: Deprecate MakeTypeRegisterStatic and MakeTypeRegisterNotStatic Date: Tue, 29 Oct 2024 16:59:33 +0800 Message-Id: <20241029085934.2799066-16-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Deprecate MakeTypeRegisterStatic and MakeTypeRegisterNotStatic because type_register() will be deprecated, then only type_register_static() is used. Signed-off-by: Zhao Liu --- .../codeconverter/qom_type_info.py | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/scripts/codeconverter/codeconverter/qom_type_info.py b/scripts/codeconverter/codeconverter/qom_type_info.py index 255cb59923da..f92c3a4730ef 100644 --- a/scripts/codeconverter/codeconverter/qom_type_info.py +++ b/scripts/codeconverter/codeconverter/qom_type_info.py @@ -901,26 +901,6 @@ class TypeRegisterCall(FileMatch): regexp = S(r'^[ \t]*', NAMED('func_name', 'type_register'), r'\s*\(&\s*', NAMED('name', RE_IDENTIFIER), r'\s*\);[ \t]*\n') -class MakeTypeRegisterStatic(TypeRegisterCall): - """Make type_register() call static if variable is static const""" - def gen_patches(self): - var = self.file.find_match(TypeInfoVar, self.name) - if var is None: - self.warn("can't find TypeInfo var declaration for %s", self.name) - return - if var.is_static() and var.is_const(): - yield self.group_match('func_name').make_patch('type_register_static') - -class MakeTypeRegisterNotStatic(TypeRegisterStaticCall): - """Make type_register() call static if variable is static const""" - def gen_patches(self): - var = self.file.find_match(TypeInfoVar, self.name) - if var is None: - self.warn("can't find TypeInfo var declaration for %s", self.name) - return - if not var.is_static() or not var.is_const(): - yield self.group_match('func_name').make_patch('type_register') - class TypeInfoMacro(FileMatch): """TYPE_INFO macro usage""" regexp = S(r'^[ \t]*TYPE_INFO\s*\(\s*', NAMED('name', RE_IDENTIFIER), r'\s*\)[ \t]*;?[ \t]*\n') From patchwork Tue Oct 29 08:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 13854491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 879C1D5B16F for ; Tue, 29 Oct 2024 08:45:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5hpk-0003AD-KC; Tue, 29 Oct 2024 04:44:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpi-00039O-KO for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:44:10 -0400 Received: from mgamail.intel.com ([198.175.65.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5hpf-00084o-PI for qemu-devel@nongnu.org; Tue, 29 Oct 2024 04:44:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730191448; x=1761727448; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aWuVA8jXTgROPvzCv0HI/sDiOJnUcWrgVtA/4tuc5rQ=; b=WYq2dSHkyyX/j+S8lWl7HIKuM1GgqSwozMxvxDhtQ0/KvXuTYr89ROuP wkGtbfjPZORdzIV910GWaocqKrzsLzXaxKaSpt4fyemQJdxuxLrbECits pfGxJgFInxkiiRs4ejM7p3xqeCmCMyQRqK6hvGUUD2wM9SccGYZp9R0zm AHftTfGe/2zUgB4GoWzUQOs0yWqsgY3RPTKUms5nPI4iy+0bh3TkWlwt7 Yjj8ePxEKRyow5wEOSdoHBTXPz13Tyie28nRtMP+nGL77AIzAOxDMUGrf HIjjEDkY4sNOJfIE3pp22CFerlYUk/EQHA6EVnUzGbGq7zajRLeEP3WaS g==; X-CSE-ConnectionGUID: hKII+bPbTPa6ruthqMCpTg== X-CSE-MsgGUID: 8bU91NukSRqFKN1XmLdjqA== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29592841" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29592841" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2024 01:43:48 -0700 X-CSE-ConnectionGUID: KxmAUw+GT9SVEvfJKYKqOg== X-CSE-MsgGUID: RakfL7METJab0/cN9hzdcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,241,1725346800"; d="scan'208";a="85847245" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa003.fm.intel.com with ESMTP; 29 Oct 2024 01:43:47 -0700 From: Zhao Liu To: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 16/16] qom/object: Deprecate type_register() Date: Tue, 29 Oct 2024 16:59:34 +0800 Message-Id: <20241029085934.2799066-17-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029085934.2799066-1-zhao1.liu@intel.com> References: <20241029085934.2799066-1-zhao1.liu@intel.com> MIME-Version: 1.0 Received-SPF: pass client-ip=198.175.65.20; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -47 X-Spam_score: -4.8 X-Spam_bar: ---- X-Spam_report: (-4.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.373, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org At present, type_register() and type_register_static() are identical, although their documentation expects the *_static variant to accept the Typeinfo with the strings that have the static lifetime. However, the code implementation doesn't have any check or guarantee for static lifetime. In fact, this is unnecessary because type_new() duplicates all strings, thereby taking ownership of them. Therefore, type_register() and type_register_static() are redundant, so one of them should be deprecated. Since the changes required to deprecate type_register() are smaller, choose to deprecate type_register() and delete the requirement about string lifetime from the documentation. Signed-off-by: Zhao Liu --- include/qom/object.h | 14 -------------- qom/object.c | 7 +------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 2af9854675c3..24c8e010c2de 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -880,24 +880,10 @@ const char *object_get_typename(const Object *obj); * type_register_static: * @info: The #TypeInfo of the new type. * - * @info and all of the strings it points to should exist for the life time - * that the type is registered. - * * Returns: the new #Type. */ Type type_register_static(const TypeInfo *info); -/** - * type_register: - * @info: The #TypeInfo of the new type - * - * Unlike type_register_static(), this call does not require @info or its - * string members to continue to exist after the call returns. - * - * Returns: the new #Type. - */ -Type type_register(const TypeInfo *info); - /** * type_register_static_array: * @infos: The array of the new type #TypeInfo structures. diff --git a/qom/object.c b/qom/object.c index 11424cf4711b..c08e7ab652d9 100644 --- a/qom/object.c +++ b/qom/object.c @@ -175,17 +175,12 @@ static TypeImpl *type_register_internal(const TypeInfo *info) return ti; } -TypeImpl *type_register(const TypeInfo *info) +TypeImpl *type_register_static(const TypeInfo *info) { assert(info->parent); return type_register_internal(info); } -TypeImpl *type_register_static(const TypeInfo *info) -{ - return type_register(info); -} - void type_register_static_array(const TypeInfo *infos, int nr_infos) { int i;