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

[PATCH v3 16/28] i8259.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:48 +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=4Zzg/I05mP5n7TY2uFK7TpWDkHes0ZRgUzLc2R50k64=; b=X9ahRmPQ5rQlbX/b1PuguizskM89hXKb1/jE0eXcchfnRx199dBJto/ybjKpfCCfuY+Y2PhCrCa3W6w947cdi74isg61PaHYc9gGeVgeioQEui0ouVa+EhwVJMMuJvRXti0w+oKYjirneLeuQWwVyJEJ79OlB1bFfLZzWUg783yeBbs7AtecNToSsmX8I7vcUAR10utn4ler3HKeeyKvfqarFGIq8efDwXpkIrP7mPkXqvcNFTm0sszdkdCgfdjeynK1aVbof+LTa80kVaiKQI5WEQ0c/OlFp9UT+oNHA8t+M1OPGwX0qjFConmkDxrppbF7qZ6Fz2PIYZkSL+4ESw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=btm41jwWjYUZDSNGcz1huZrUT/YQFnvPMxAgGsUy7YMy2265NJ0EqDPmpljGeH2Mw+p+U/X9xvWXdWqOzUTs+UsT4Qx5guQ9nJ46wjYF3/MjHpmCOImIwK/W+D82G8SWaOcZcuoy0tD6JHbX8pv+mQrY08IOTg8VRqGIhKa7iEgOnXNgzQmP1MV/fyhcKmly2V/43S25sqE3+uVgnYqSzqguFS6SMB93gUAdzLuRuQ22Ywu561EQy3zveAAnp4vfp4B0SrbW+fcaBm3AjBPRXoz5rRHvBktXOS57ij2wKWYo7uOZhRUGc6SuSZll5TqKthhUbyNZXDrWmC0+d3q1BQ==
  • 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:22 +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.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index 4b34e5a649..e5fa0f2e5e 100644
--- a/hw/intc/i8259.c
+++ b/hw/intc/i8259.c
@@ -447,17 +447,14 @@ static void i8259_class_init(ObjectClass *klass, const 
void *data)
     device_class_set_legacy_reset(dc, i8259_reset);
 }
 
-static const TypeInfo i8259_info = {
-    .name       = TYPE_I8259,
-    .instance_size = sizeof(I8259State),
-    .parent     = TYPE_I8259_COMMON,
-    .class_init = i8259_class_init,
-    .class_size = sizeof(I8259Class),
+static const TypeInfo i8259_type_infos[] = {
+    {
+        .name       = TYPE_I8259,
+        .instance_size = sizeof(I8259State),
+        .parent     = TYPE_I8259_COMMON,
+        .class_init = i8259_class_init,
+        .class_size = sizeof(I8259Class),
+    },
 };
 
-static void i8259_register_types(void)
-{
-    type_register_static(&i8259_info);
-}
-
-type_init(i8259_register_types)
+DEFINE_TYPES(i8259_type_infos)
-- 
2.43.0




 


Rackspace

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