[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/23] vmstate: Constify some VMStateDescriptions
From: |
Laurent Vivier |
Subject: |
[PULL 06/23] vmstate: Constify some VMStateDescriptions |
Date: |
Mon, 3 May 2021 10:36:06 +0200 |
From: Keqian Zhu <zhukeqian1@huawei.com>
Constify vmstate_ecc_state and vmstate_x86_cpu.
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210408140706.23412-1-zhukeqian1@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/block/ecc.c | 2 +-
include/hw/block/flash.h | 2 +-
target/i386/cpu.h | 2 +-
target/i386/machine.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/block/ecc.c b/hw/block/ecc.c
index 1a182367ee63..6e0d63842c14 100644
--- a/hw/block/ecc.c
+++ b/hw/block/ecc.c
@@ -78,7 +78,7 @@ void ecc_reset(ECCState *s)
}
/* Save/restore */
-VMStateDescription vmstate_ecc_state = {
+const VMStateDescription vmstate_ecc_state = {
.name = "ecc-state",
.version_id = 0,
.minimum_version_id = 0,
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
index 7dde0adcee78..86d8363bb09e 100644
--- a/include/hw/block/flash.h
+++ b/include/hw/block/flash.h
@@ -74,6 +74,6 @@ typedef struct {
uint8_t ecc_digest(ECCState *s, uint8_t sample);
void ecc_reset(ECCState *s);
-extern VMStateDescription vmstate_ecc_state;
+extern const VMStateDescription vmstate_ecc_state;
#endif
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 570f916878f9..1bc300ce85de 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1786,7 +1786,7 @@ struct X86CPU {
#ifndef CONFIG_USER_ONLY
-extern VMStateDescription vmstate_x86_cpu;
+extern const VMStateDescription vmstate_x86_cpu;
#endif
int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request);
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 137604ddb898..f6f094f1c938 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -1396,7 +1396,7 @@ static const VMStateDescription vmstate_msr_tsx_ctrl = {
}
};
-VMStateDescription vmstate_x86_cpu = {
+const VMStateDescription vmstate_x86_cpu = {
.name = "cpu",
.version_id = 12,
.minimum_version_id = 11,
--
2.31.1
- [PULL 00/23] Trivial branch for 6.1 patches, Laurent Vivier, 2021/05/03
- [PULL 10/23] ui: Fix memory leak in qemu_xkeymap_mapping_table(), Laurent Vivier, 2021/05/03
- [PULL 05/23] Fix typo in CFI build documentation, Laurent Vivier, 2021/05/03
- [PULL 08/23] hw/display/qxl: Constify VMStateDescription, Laurent Vivier, 2021/05/03
- [PULL 04/23] hw/pcmcia: Do not register PCMCIA type if not required, Laurent Vivier, 2021/05/03
- [PULL 01/23] accel: kvm: clarify that extra exit data is hexadecimal, Laurent Vivier, 2021/05/03
- [PULL 02/23] hw/arm/pxa2xx: Declare PCMCIA bus with Kconfig, Laurent Vivier, 2021/05/03
- [PULL 11/23] hw: Remove superfluous includes of hw/hw.h, Laurent Vivier, 2021/05/03
- [PULL 07/23] hw/arm: Constify VMStateDescription, Laurent Vivier, 2021/05/03
- [PULL 06/23] vmstate: Constify some VMStateDescriptions,
Laurent Vivier <=
- [PULL 13/23] hw: Do not include hw/irq.h if it is not necessary, Laurent Vivier, 2021/05/03
- [PULL 16/23] Do not include hw/boards.h if it's not really necessary, Laurent Vivier, 2021/05/03
- [PULL 09/23] hw/usb: Constify VMStateDescription, Laurent Vivier, 2021/05/03
- [PULL 03/23] hw/ide: Add Kconfig dependency MICRODRIVE -> PCMCIA, Laurent Vivier, 2021/05/03
- [PULL 12/23] hw: Do not include hw/sysbus.h if it is not necessary, Laurent Vivier, 2021/05/03
- [PULL 14/23] hw: Do not include qemu/log.h if it is not necessary, Laurent Vivier, 2021/05/03
- [PULL 20/23] docs/system: Document the removal of "compat" property for POWER CPUs, Laurent Vivier, 2021/05/03
- [PULL 18/23] Do not include exec/address-spaces.h if it's not really necessary, Laurent Vivier, 2021/05/03
- [PULL 17/23] Do not include cpu.h if it's not really necessary, Laurent Vivier, 2021/05/03
- [PULL 15/23] Do not include sysemu/sysemu.h if it's not really necessary, Laurent Vivier, 2021/05/03