diff options
author | Keqian Zhu <zhukeqian1@huawei.com> | 2021-04-08 22:07:06 +0800 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-05-02 17:24:50 +0200 |
commit | ac701a4f98d68156fcddbe3bb3f7c3869b8c646e (patch) | |
tree | 52794b914e38bb73ce8b1656c52dd64890d96821 | |
parent | 04a252112119d34e10d9b0bd65c499e1b17dc8fe (diff) | |
download | qemu-ac701a4f98d68156fcddbe3bb3f7c3869b8c646e.zip qemu-ac701a4f98d68156fcddbe3bb3f7c3869b8c646e.tar.gz qemu-ac701a4f98d68156fcddbe3bb3f7c3869b8c646e.tar.bz2 |
vmstate: Constify some VMStateDescriptions
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>
-rw-r--r-- | hw/block/ecc.c | 2 | ||||
-rw-r--r-- | include/hw/block/flash.h | 2 | ||||
-rw-r--r-- | target/i386/cpu.h | 2 | ||||
-rw-r--r-- | 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 1a18236..6e0d638 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 7dde0ad..86d8363 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 570f916..1bc300c 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 137604d..f6f094f 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, |