On Wed, 14 May 2025, Zhao Liu wrote:
The QOM type of SHSerialState is declared by OBJECT_DECLARE_SIMPLE_TYPE,
which means it doesn't need the class!
Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement
Patch uses OBJECT_DEFINE_SIMPLE_TYPE not
OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES so change commit message to
match the patch.
Regards,
BALATON Zoltan
the type, then there's no need for class definition.
Cc: Yoshinori Sato <ys...@users.sourceforge.jp>
Cc: Magnus Damm <magnus.d...@gmail.com>
Cc: "Marc-André Lureau" <marcandre.lur...@redhat.com>
Cc: Paolo Bonzini <pbonz...@redhat.com>
Signed-off-by: Zhao Liu <zhao1....@intel.com>
---
hw/char/sh_serial.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 6abd80386fb4..8ccc2234ba4d 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
@@ -78,9 +78,7 @@ struct SHSerialState {
qemu_irq bri;
};
-typedef struct {} SHSerialStateClass;
-
-OBJECT_DEFINE_TYPE(SHSerialState, sh_serial, SH_SERIAL, SYS_BUS_DEVICE)
+OBJECT_DEFINE_SIMPLE_TYPE(SHSerialState, sh_serial, SH_SERIAL, SYS_BUS_DEVICE)
static void sh_serial_clear_fifo(SHSerialState *s)
{