From: Peter Maydell <peter.maydell@linaro.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
qemu-ppc <qemu-ppc@nongnu.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 4/4] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR
Date: Thu, 7 Jun 2018 20:28:48 +0100 [thread overview]
Message-ID: <CAFEAcA9Ur6rwLETdcS8mA_Se55eRWmfFWE8VRhtJgsp90D9U4Q@mail.gmail.com> (raw)
In-Reply-To: <20180607171751.11510-5-mark.cave-ayland@ilande.co.uk>
On 7 June 2018 at 18:17, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:
> The timers are configured in the mos6522 init function and therefore will
> always exist, so the function can never return false.
>
> Peter also pointed out that this is the only remaining user of
> VMSTATE_TIMER_PTR_TEST in the codebase, so we might as well just convert it
> over to VMSTATE_TIMER_PTR and remove mos6522_timer_exist() as it is no
> longer required.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/misc/mos6522.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c
> index d0a0c9e5d9..e9b686ac92 100644
> --- a/hw/misc/mos6522.c
> +++ b/hw/misc/mos6522.c
> @@ -369,13 +369,6 @@ static const MemoryRegionOps mos6522_ops = {
> },
> };
>
> -static bool mos6522_timer_exist(void *opaque, int version_id)
> -{
> - MOS6522Timer *s = opaque;
> -
> - return s->timer != NULL;
> -}
> -
> static const VMStateDescription vmstate_mos6522_timer = {
> .name = "mos6522_timer",
> .version_id = 0,
> @@ -385,7 +378,7 @@ static const VMStateDescription vmstate_mos6522_timer = {
> VMSTATE_UINT16(counter_value, MOS6522Timer),
> VMSTATE_INT64(load_time, MOS6522Timer),
> VMSTATE_INT64(next_irq_time, MOS6522Timer),
> - VMSTATE_TIMER_PTR_TEST(timer, MOS6522Timer, mos6522_timer_exist),
> + VMSTATE_TIMER_PTR(timer, MOS6522Timer),
> VMSTATE_END_OF_LIST()
> }
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
next prev parent reply other threads:[~2018-06-07 19:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-07 17:17 [Qemu-devel] [PATCH 0/4] cuda/mos6522 migration fixes Mark Cave-Ayland
2018-06-07 17:17 ` [Qemu-devel] [PATCH 1/4] mos6522: fix vmstate_mos6522_timer version in vmstate_mos6522 Mark Cave-Ayland
2018-06-07 17:17 ` [Qemu-devel] [PATCH 2/4] cuda: embed mos6522_cuda device directly rather than using QOM object link Mark Cave-Ayland
2018-06-08 2:13 ` David Gibson
2018-06-07 17:17 ` [Qemu-devel] [PATCH 3/4] mos6522: move timer frequency initialisation to mos6522_reset Mark Cave-Ayland
2018-06-07 17:17 ` [Qemu-devel] [PATCH 4/4] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR Mark Cave-Ayland
2018-06-07 19:28 ` Peter Maydell [this message]
2018-06-07 19:18 ` [Qemu-devel] [PATCH 0/4] cuda/mos6522 migration fixes Philippe Mathieu-Daudé
2018-06-07 20:17 ` Peter Maydell
2018-06-07 21:10 ` Philippe Mathieu-Daudé
2018-06-08 2:11 ` David Gibson
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=CAFEAcA9Ur6rwLETdcS8mA_Se55eRWmfFWE8VRhtJgsp90D9U4Q@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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).