[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/2] hw/isa/superio: Set abstract TYPE_ISA_SUPERIO instance si
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 1/2] hw/isa/superio: Set abstract TYPE_ISA_SUPERIO instance size |
Date: |
Sat, 22 Aug 2020 16:28:15 +0200 |
Instead of setting the instance size on each implementations,
set it on the abstract parent, so we are sure no implementation
will forget to set it.
Reported-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/isa/isa-superio.c | 2 +-
hw/isa/smc37c669-superio.c | 1 -
hw/isa/vt82c686.c | 1 -
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index e2e47d8fd99..83eb21ebb2a 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -182,6 +182,7 @@ static const TypeInfo isa_superio_type_info = {
.name = TYPE_ISA_SUPERIO,
.parent = TYPE_ISA_DEVICE,
.abstract = true,
+ .instance_size = sizeof(ISASuperIODevice),
.class_size = sizeof(ISASuperIOClass),
.class_init = isa_superio_class_init,
};
@@ -200,7 +201,6 @@ static void fdc37m81x_class_init(ObjectClass *klass, void
*data)
static const TypeInfo fdc37m81x_type_info = {
.name = TYPE_FDC37M81X_SUPERIO,
.parent = TYPE_ISA_SUPERIO,
- .instance_size = sizeof(ISASuperIODevice),
.class_init = fdc37m81x_class_init,
};
diff --git a/hw/isa/smc37c669-superio.c b/hw/isa/smc37c669-superio.c
index 18287741cb4..9e59dc16039 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,
- .instance_size = sizeof(ISASuperIODevice),
.class_size = sizeof(ISASuperIOClass),
.class_init = smc37c669_class_init,
};
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 18160ca445d..a4b84d405d0 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,
- .instance_size = sizeof(ISASuperIODevice),
.class_size = sizeof(ISASuperIOClass),
.class_init = vt82c686b_superio_class_init,
};
--
2.26.2