[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 21/33] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTA
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 21/33] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR |
Date: |
Tue, 12 Jun 2018 16:44:51 +1000 |
From: Mark Cave-Ayland <address@hidden>
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>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: David Gibson <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 2f58b9707f..44eb306cf1 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.17.1
- [Qemu-ppc] [PULL 17/33] ppc: add missing FW_CFG_PPC_NVRAM_FLAT definition, (continued)
- [Qemu-ppc] [PULL 17/33] ppc: add missing FW_CFG_PPC_NVRAM_FLAT definition, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 14/33] hw/misc/mos6522: Add trailing '\n' to qemu_log() calls, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 20/33] mos6522: move timer frequency initialisation to mos6522_reset, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 12/33] MAINTAINERS: Add an entry for the MacIO device headers, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 19/33] cuda: embed mos6522_cuda device directly rather than using QOM object link, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 22/33] target/ppc: extend eieio for POWER9, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 18/33] mos6522: fix vmstate_mos6522_timer version in vmstate_mos6522, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 29/33] spapr: handle pc-dimm unplug via hotplug handler chain, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 30/33] spapr: handle cpu core unplug via hotplug handler chain, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 31/33] ppc/pnv: fix LPC HC firmware address space, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 21/33] mos6522: convert VMSTATE_TIMER_PTR_TEST to VMSTATE_TIMER_PTR,
David Gibson <=
- [Qemu-ppc] [PULL 26/33] spapr: move lookup of the node into spapr_memory_plug(), David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 33/33] spapr_pci: Remove unhelpful pagesize warning, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 24/33] target/ppc: Allow PIR read in privileged mode, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 25/33] spapr: no need to verify the node, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 23/33] ppc4xx_i2c: Clean up and improve error logging, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 32/33] xics_kvm: use KVM helpers, David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 27/33] spapr: move memory hotplug support check into spapr_memory_pre_plug(), David Gibson, 2018/06/12
- [Qemu-ppc] [PULL 28/33] spapr: introduce machine unplug handler, David Gibson, 2018/06/12