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

[PATCH 10/22] 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: Wed, 16 Sep 2026 11:43:38 +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=X2tdt+OFRJu3/CyARXQCgURgSsSHaKXcsV/f/DeQLC0=; b=cQaKTYEhGgOZ1SqIq+WdWBq6mKADQf7ao/hmCduzmj/PsJ1j0ehKOKxiEFNG7F+/EQ2zJ+/ceu796+WdMdp7dmCWzIWOV20v7zwydRTXrdqVS5BGwDkExO/5ljQMrik5AK9Fs55KqJGFMhRGuSIEZT52g9ntWWpC1H5CjgXplyz3d17aJx7yG2JQMrc1R6aM3kka7axN3H33nSUR6JoMb5JG/BbgBjVoWZxfGyCzp9yNGTk+kQidLpUn30t4/tJnySVZDY4tXPYIkz6+OGXI+wY27YF6McPT9lPCgWosCML+O+XePibmdBqvDQsmR65dHt18+zrQzHVrrXMPXcPy7A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NQO/vaaCAqSpCRa5TMHFZf3YKzFNFehxiKbdPwxjBTbLl/V/cFc+/Qx0bJwrYJyJJmiOW31ZOkwoCkXNA1+FM7TKR9FG5CbLSCH+WCKuMvJmC0QrOeTQ2MDy+dI0HOb/ij0dLYaKD4rZH7dROW5b49nY+Q7ORU8clIh8Np94OssZOJskatSnfunTvzftfynHeVLsN3WQi/IeH+Tkw7M2o/RSZyZQS7wvaJdAf1heywv9vC4fWbpNdUO6HfYLv/vABSfRgtd1kyTErSJKtRbT0Zr+vm38Rx74UA6GLqju+rw6OCtJxiKHv8GrTDkSb7rqgGO6gMkJk1l0VGoV8te3rQ==
  • 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"
  • Delivery-date: Wed, 16 Sep 2026 10:45:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
---
 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 e03bbb9a8c..ec229a0b5d 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®.