From: Peter Maydell <peter.maydell@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Juan Quintela" <quintela@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 1/2] hw/char/serial: Separate and document static properties
Date: Fri, 10 Jul 2020 09:23:35 +0100 [thread overview]
Message-ID: <CAFEAcA8uu8f30rhHzj_yvF2nMvP59rG4toa5N-QgR55f6erTdA@mail.gmail.com> (raw)
In-Reply-To: <20200703185809.5896-2-f4bug@amsat.org>
On Fri, 3 Jul 2020 at 19:59, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Add more descriptive comments to keep a clear separation
> between static property vs runtime changeable.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> include/hw/char/serial.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h
> index 535fa23a2b..d955963ef1 100644
> --- a/include/hw/char/serial.h
> +++ b/include/hw/char/serial.h
> @@ -55,9 +55,7 @@ typedef struct SerialState {
> it can be reset while reading iir */
> int thr_ipending;
> qemu_irq irq;
> - CharBackend chr;
> int last_break_enable;
> - uint32_t baudbase;
> uint32_t tsr_retry;
> guint watch_tag;
> uint32_t wakeup;
> @@ -77,6 +75,10 @@ typedef struct SerialState {
>
> QEMUTimer *modem_status_poll;
> MemoryRegion io;
> +
> + /* Properties */
> + CharBackend chr;
> + uint32_t baudbase;
> } SerialState;
>
> typedef struct SerialMM {
> @@ -84,6 +86,7 @@ typedef struct SerialMM {
>
> SerialState serial;
>
> + /* Properties */
> uint8_t regshift;
> uint8_t endianness;
> } SerialMM;
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Incidentally 'baudbase' is technically runtime updateable
via the serial_set_frequency() function, except that there
are no callers of it. We should delete that as unused code.
thanks
-- PMM
next prev parent reply other threads:[~2020-07-10 8:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 18:58 [PATCH 0/2] hw/char/serial: Migrate I/O serial device Philippe Mathieu-Daudé
2020-07-03 18:58 ` [PATCH 1/2] hw/char/serial: Separate and document static properties Philippe Mathieu-Daudé
2020-07-10 8:23 ` Peter Maydell [this message]
2020-07-10 9:24 ` Juan Quintela
2020-07-03 18:58 ` [PATCH 2/2] hw/char/serial: Allow migration of the I/O serial device Philippe Mathieu-Daudé
2020-07-07 10:39 ` Paolo Bonzini
2020-07-10 8:34 ` Peter Maydell
2020-07-10 9:32 ` Juan Quintela
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=CAFEAcA8uu8f30rhHzj_yvF2nMvP59rG4toa5N-QgR55f6erTdA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=dgilbert@redhat.com \
--cc=f4bug@amsat.org \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).