qemu-devel
[Top][All Lists]
Advanced

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

[PATCH v2 2/2] hw/isa/superio: Do not enforce class_size when inherited


From: Philippe Mathieu-Daudé
Subject: [PATCH v2 2/2] hw/isa/superio: Do not enforce class_size when inherited from parent
Date: Sat, 22 Aug 2020 16:28:16 +0200

From: Eduardo Habkost <ehabkost@redhat.com>

When a class inherits from an abstract parent, its class_size
is already initialized to its parent size. If the class is not
extended, it is pointless to set the class_size field again.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/isa/smc37c669-superio.c | 1 -
 hw/isa/vt82c686.c          | 1 -
 2 files changed, 2 deletions(-)

diff --git a/hw/isa/smc37c669-superio.c b/hw/isa/smc37c669-superio.c
index 9e59dc16039..18cdc641e13 100644
--- a/hw/isa/smc37c669-superio.c
+++ b/hw/isa/smc37c669-superio.c
@@ -103,7 +103,6 @@ static void smc37c669_class_init(ObjectClass *klass, void 
*data)
 static const TypeInfo smc37c669_type_info = {
     .name          = TYPE_SMC37C669_SUPERIO,
     .parent        = TYPE_ISA_SUPERIO,
-    .class_size    = sizeof(ISASuperIOClass),
     .class_init    = smc37c669_class_init,
 };
 
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index a4b84d405d0..49f2b21cebe 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -533,7 +533,6 @@ static void vt82c686b_superio_class_init(ObjectClass 
*klass, void *data)
 static const TypeInfo via_superio_info = {
     .name          = TYPE_VT82C686B_SUPERIO,
     .parent        = TYPE_ISA_SUPERIO,
-    .class_size    = sizeof(ISASuperIOClass),
     .class_init    = vt82c686b_superio_class_init,
 };
 
-- 
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]