[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 15/28] i8259_common.c: convert to use DEFINE_TYPES() macro


  • To: pbonzini@xxxxxxxxxx, richard.henderson@xxxxxxxxxx, mst@xxxxxxxxxx, sstabellini@xxxxxxxxxx, anthony@xxxxxxxxxxxxxx, edgar.iglesias@xxxxxxxxx, qemu-devel@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
  • Date: Mon, 19 Oct 2026 13:04:47 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=po3EEb9dG7/G0E+Na053cQN8h6xsnwFa0pjZGUjYeP8=; b=TdqJ7GZTuIAFyuAw8u9RXXfO/zyj3oHiRPfiVgqfz4tQfssOcnUdE2R9lXWvcisEbfgKQpLLrFXARSX1FmGiQaRuKxDz/6BvI/acRVbjcLqBeGhIOBpaTZQhjrk4r/JtWtgEOS607+VWm7PUUegTkpbqg5x3Gia/OWuM9iJEJgJFof2OOulcNYyESBhBkqtd19qmlHhHSLUKVUxn/KX+JbIjsVBEdtKk5XKbZdJfYDq5XEtP/Fj7kFM9hqhFlQATBXnX0edb41nUiHfqunZCzJ3BVDEq3Ln8gwWS+M98kLuKqKuCvytOEHdBhyRSdYoohQDIgtI3ua6movow+wN1ow==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Wv45yEzcQFDAmDS2ikfc5aRsYA4UkWDeTJBGPaqgJ95AvkeAulVAAN81uPwDjAp6IYKcaQ+KORC7UG0VhtxsrSOa1AJglh07dmkwzQIQ8yEjLeGRS4t5xUmWWuljBKDlZQfrOozcFZryi8UaH0aeywUkK8YIXzmwXK9x4dL+3LP1r9LwleOSFWeaLxqaWwM1jgnXBIp6cWkCdP6Z1qO1qLyagaENNPHZ6tw4/wVE2sluZRXf35S88P2WyKlorw/rAF51TolkJS30uLn/lEf9HAcGbQGRcSpjZuQmCNUjQTfYajc59uv6z11vTsDVwLZ01c4Dz/1/HOYgbZy831zAUA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=proofpoint20171006 header.d=nutanix.com header.i="@nutanix.com" header.h="Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector1 header.d=nutanix.com header.i="@nutanix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nutanix.com;
  • Delivery-date: Mon, 19 Oct 2026 12:06:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
Reviewed-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
---
 hw/intc/i8259_common.c | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c
index 31bd663439..09b761321a 100644
--- a/hw/intc/i8259_common.c
+++ b/hw/intc/i8259_common.c
@@ -220,22 +220,19 @@ static void i8259_common_class_init(ObjectClass *klass, 
const void *data)
     ic->print_info = i8259_common_print_info;
 }
 
-static const TypeInfo i8259_common_type = {
-    .name = TYPE_I8259_COMMON,
-    .parent = TYPE_ISA_DEVICE,
-    .instance_size = sizeof(I8259CommonState),
-    .class_size = sizeof(I8259CommonClass),
-    .class_init = i8259_common_class_init,
-    .abstract = true,
-    .interfaces = (const InterfaceInfo[]) {
-        { TYPE_INTERRUPT_STATS_PROVIDER },
-        { }
+static const TypeInfo i8259_common_type_infos[] = {
+    {
+        .name = TYPE_I8259_COMMON,
+        .parent = TYPE_ISA_DEVICE,
+        .instance_size = sizeof(I8259CommonState),
+        .class_size = sizeof(I8259CommonClass),
+        .class_init = i8259_common_class_init,
+        .abstract = true,
+        .interfaces = (const InterfaceInfo[]) {
+            { TYPE_INTERRUPT_STATS_PROVIDER },
+            { }
+        },
     },
 };
 
-static void i8259_common_register_types(void)
-{
-    type_register_static(&i8259_common_type);
-}
-
-type_init(i8259_common_register_types)
+DEFINE_TYPES(i8259_common_type_infos)
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.