hw/tpm: Constify VMState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-58-richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-12-21 14:16:38 +11:00
parent ba324b3fb4
commit 5e6aceb2dd
6 changed files with 6 additions and 6 deletions

View File

@ -220,7 +220,7 @@ static int tpm_crb_pre_save(void *opaque)
static const VMStateDescription vmstate_tpm_crb = {
.name = "tpm-crb",
.pre_save = tpm_crb_pre_save,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32_ARRAY(regs, CRBState, TPM_CRB_R_MAX),
VMSTATE_END_OF_LIST(),
}

View File

@ -353,7 +353,7 @@ static const VMStateDescription vmstate_spapr_vtpm = {
.name = "tpm-spapr",
.pre_save = tpm_spapr_pre_save,
.post_load = tpm_spapr_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_SPAPR_VIO(vdev, SpaprTpmState),
VMSTATE_UINT8(state, SpaprTpmState),

View File

@ -879,7 +879,7 @@ int tpm_tis_pre_save(TPMState *s)
const VMStateDescription vmstate_locty = {
.name = "tpm-tis/locty",
.version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(state, TPMLocality),
VMSTATE_UINT32(inte, TPMLocality),
VMSTATE_UINT32(ints, TPMLocality),

View File

@ -115,7 +115,7 @@ static const VMStateDescription vmstate_tpm_tis_i2c = {
.version_id = 0,
.pre_save = tpm_tis_i2c_pre_save,
.post_load = tpm_tis_i2c_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_BUFFER(state.buffer, TPMStateI2C),
VMSTATE_UINT16(state.rw_offset, TPMStateI2C),
VMSTATE_UINT8(state.active_locty, TPMStateI2C),

View File

@ -53,7 +53,7 @@ static const VMStateDescription vmstate_tpm_tis_isa = {
.name = "tpm-tis",
.version_id = 0,
.pre_save = tpm_tis_pre_save_isa,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_BUFFER(state.buffer, TPMStateISA),
VMSTATE_UINT16(state.rw_offset, TPMStateISA),
VMSTATE_UINT8(state.active_locty, TPMStateISA),

View File

@ -52,7 +52,7 @@ static const VMStateDescription vmstate_tpm_tis_sysbus = {
.name = "tpm-tis",
.version_id = 0,
.pre_save = tpm_tis_pre_save_sysbus,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_BUFFER(state.buffer, TPMStateSysBus),
VMSTATE_UINT16(state.rw_offset, TPMStateSysBus),
VMSTATE_UINT8(state.active_locty, TPMStateSysBus),