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 2/5] hw/audio/es1370: Avoid forward-declaring ES1370State
Date: Mon, 20 Feb 2023 14:18:34 +0100 [thread overview]
Message-ID: <20230220131837.26292-3-philmd@linaro.org> (raw)
In-Reply-To: <20230220131837.26292-1-philmd@linaro.org>
To avoid forward-declaring ES1370State, declare ES1370 QOM
definitions before its use in the chan_bits structure.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/audio/es1370.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
index 54cc19a637..ea76c9a734 100644
--- a/hw/audio/es1370.c
+++ b/hw/audio/es1370.c
@@ -256,6 +256,9 @@ static void print_sctl (uint32_t val)
#define lwarn(...)
#endif
+#define TYPE_ES1370 "ES1370"
+OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370)
+
struct chan {
uint32_t shift;
uint32_t leftover;
@@ -278,7 +281,6 @@ struct ES1370State {
uint32_t codec;
uint32_t sctl;
};
-typedef struct ES1370State ES1370State;
struct chan_bits {
uint32_t ctl_en;
@@ -292,9 +294,6 @@ struct chan_bits {
uint32_t *old_freq, uint32_t *new_freq);
};
-#define TYPE_ES1370 "ES1370"
-OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370)
-
static void es1370_dac1_calc_freq (ES1370State *s, uint32_t ctl,
uint32_t *old_freq, uint32_t *new_freq);
static void es1370_dac2_and_adc_calc_freq (ES1370State *s, uint32_t ctl,
--
2.38.1
next prev parent 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 ` [PATCH 1/5] hw/audio/hda-codec: Avoid forward-declaring HDAAudioState Philippe Mathieu-Daudé
2023-02-20 18:59 ` Richard Henderson
2023-02-20 13:18 ` Philippe Mathieu-Daudé [this message]
2023-02-20 19:00 ` [PATCH 2/5] hw/audio/es1370: Avoid forward-declaring ES1370State 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-3-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).