qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <eduardo@habkost.net>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 1/5] hw/audio/hda-codec: Avoid forward-declaring HDAAudioState
Date: Mon, 20 Feb 2023 14:18:33 +0100	[thread overview]
Message-ID: <20230220131837.26292-2-philmd@linaro.org> (raw)
In-Reply-To: <20230220131837.26292-1-philmd@linaro.org>

To avoid forward-declaring HDAAudioState, declare HDA_AUDIO QOM
definitions before its use in the HDAAudioStream structure.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/audio/hda-codec.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c
index feb8f9e2bb..c51d8ba617 100644
--- a/hw/audio/hda-codec.c
+++ b/hw/audio/hda-codec.c
@@ -145,7 +145,9 @@ static const char *fmt2name[] = {
     [ AUDIO_FORMAT_S32 ] = "PCM-S32",
 };
 
-typedef struct HDAAudioState HDAAudioState;
+#define TYPE_HDA_AUDIO "hda-audio"
+OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO)
+
 typedef struct HDAAudioStream HDAAudioStream;
 
 struct HDAAudioStream {
@@ -171,9 +173,6 @@ struct HDAAudioStream {
     int64_t buft_start;
 };
 
-#define TYPE_HDA_AUDIO "hda-audio"
-OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO)
-
 struct HDAAudioState {
     HDACodecDevice hda;
     const char *name;
-- 
2.38.1



  reply	other threads:[~2023-02-20 13:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 13:18 [PATCH 0/5] hw/audio: Cleanups around QOM style Philippe Mathieu-Daudé
2023-02-20 13:18 ` Philippe Mathieu-Daudé [this message]
2023-02-20 18:59   ` [PATCH 1/5] hw/audio/hda-codec: Avoid forward-declaring HDAAudioState Richard Henderson
2023-02-20 13:18 ` [PATCH 2/5] hw/audio/es1370: Avoid forward-declaring ES1370State Philippe Mathieu-Daudé
2023-02-20 19:00   ` Richard Henderson
2023-02-20 13:18 ` [PATCH 3/5] hw/audio/es1370: Replace container_of() by ES1370() QOM cast macro Philippe Mathieu-Daudé
2023-02-20 19:05   ` Richard Henderson
2023-02-20 13:18 ` [PATCH 4/5] hw/audio/ac97: Replace container_of() by AC97() " Philippe Mathieu-Daudé
2023-02-20 19:06   ` Richard Henderson
2023-02-20 13:18 ` [PATCH 5/5] hw/audio/pcspk: Open-code pcspk_init() Philippe Mathieu-Daudé

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=20230220131837.26292-2-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=armbru@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=hpoussin@reactos.org \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).