[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 4/4] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTAT
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-ppc] [PATCH 4/4] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR |
Date: |
Thu, 7 Jun 2018 18:17:51 +0100 |
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 <address@hidden>
---
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()
}
};
--
2.11.0
- [Qemu-ppc] [PATCH 0/4] cuda/mos6522 migration fixes, Mark Cave-Ayland, 2018/06/07
- [Qemu-ppc] [PATCH 1/4] mos6522: fix vmstate_mos6522_timer version in vmstate_mos6522, Mark Cave-Ayland, 2018/06/07
- [Qemu-ppc] [PATCH 2/4] cuda: embed mos6522_cuda device directly rather than using QOM object link, Mark Cave-Ayland, 2018/06/07
- [Qemu-ppc] [PATCH 3/4] mos6522: move timer frequency initialisation to mos6522_reset, Mark Cave-Ayland, 2018/06/07
- [Qemu-ppc] [PATCH 4/4] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR,
Mark Cave-Ayland <=
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/4] cuda/mos6522 migration fixes, Philippe Mathieu-Daudé, 2018/06/07
- Re: [Qemu-ppc] [PATCH 0/4] cuda/mos6522 migration fixes, David Gibson, 2018/06/07