qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Zhenzhong Duan <zhenzhong.duan@intel.com>, qemu-devel@nongnu.org
Cc: chao.p.peng@intel.com, david@redhat.com, armbru@redhat.com,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH v4 4/5] hw/char/sh_serial: Remove dummy definition of SH_SERIAL class
Date: Fri, 6 Jun 2025 12:40:06 +0200	[thread overview]
Message-ID: <22f73acc-bc5e-4cf5-bbd9-c2c94bec9d33@linaro.org> (raw)
In-Reply-To: <20250606092406.229833-5-zhenzhong.duan@intel.com>

On 6/6/25 11:24, Zhenzhong Duan wrote:
> SH_SERIAL is declared with OBJECT_DECLARE_SIMPLE_TYPE but defined with
> OBJECT_DEFINE_TYPE, SHSerialStateClass is also a dummy class which
> missed its parent.
> 
> Change to use OBJECT_DEFINE_SIMPLE_TYPE and remove SHSerialStateClass.
> 
> Closes: https://lists.gnu.org/archive/html/qemu-devel/2025-06/msg00586.html
> Suggested-by: David Hildenbrand <david@redhat.com>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@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 6abd80386f..8ccc2234ba 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)

I'm surprised this is the first time we use OBJECT_DEFINE_SIMPLE_TYPE.


  reply	other threads:[~2025-06-06 10:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06  9:24 [PATCH v4 0/5] Fix definition of classes with wrong parent Zhenzhong Duan
2025-06-06  9:24 ` [PATCH v4 1/5] virtio-mem: Fix definition of VirtIOMEMClass Zhenzhong Duan
2025-06-06  9:24 ` [PATCH v4 2/5] virtio-pmem: Fix definition of VirtIOPMEMClass Zhenzhong Duan
2025-06-06  9:24 ` [PATCH v4 3/5] hw/gpio/aspeed: Fix definition of AspeedGPIOClass Zhenzhong Duan
2025-06-06  9:24 ` [PATCH v4 4/5] hw/char/sh_serial: Remove dummy definition of SH_SERIAL class Zhenzhong Duan
2025-06-06 10:40   ` Philippe Mathieu-Daudé [this message]
2025-06-06 10:48     ` Philippe Mathieu-Daudé
2025-06-09  3:06       ` Duan, Zhenzhong
2025-06-06  9:24 ` [PATCH v4 5/5] hw/riscv/riscv-iommu: Remove definition of RISCVIOMMU[Pci|Sys]Class Zhenzhong Duan
2025-06-09  3:43   ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22f73acc-bc5e-4cf5-bbd9-c2c94bec9d33@linaro.org \
    --to=philmd@linaro.org \
    --cc=armbru@redhat.com \
    --cc=chao.p.peng@intel.com \
    --cc=david@redhat.com \
    --cc=magnus.damm@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ysato@users.sourceforge.jp \
    --cc=zhenzhong.duan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).