Skip to content

Commit

Permalink
hw/pci-host: Constify VMState
Browse files Browse the repository at this point in the history
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231221031652.119827-47-richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Dec 29, 2023
1 parent f026c57 commit e2bd53a
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions hw/pci-host/astro.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static const VMStateDescription vmstate_elroy = {
.name = "Elroy",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(hpa, ElroyState),
VMSTATE_UINT32(pci_bus_num, ElroyState),
VMSTATE_UINT64(config_address, ElroyState),
Expand Down Expand Up @@ -691,7 +691,7 @@ static const VMStateDescription vmstate_astro = {
.name = "Astro",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(ioc_ctrl, AstroState),
VMSTATE_UINT64(ioc_status_ctrl, AstroState),
VMSTATE_UINT64_ARRAY(ioc_ranges, AstroState, (0x03d8 - 0x300) / 8),
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/bonito.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ static const VMStateDescription vmstate_bonito = {
.name = "Bonito",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(dev, PCIBonitoState),
VMSTATE_END_OF_LIST()
}
Expand Down
10 changes: 5 additions & 5 deletions hw/pci-host/designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ static const VMStateDescription vmstate_designware_pcie_msi_bank = {
.name = "designware-pcie-msi-bank",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(enable, DesignwarePCIEMSIBank),
VMSTATE_UINT32(mask, DesignwarePCIEMSIBank),
VMSTATE_UINT32(status, DesignwarePCIEMSIBank),
Expand All @@ -541,7 +541,7 @@ static const VMStateDescription vmstate_designware_pcie_msi = {
.name = "designware-pcie-msi",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(base, DesignwarePCIEMSI),
VMSTATE_STRUCT_ARRAY(intr,
DesignwarePCIEMSI,
Expand All @@ -557,7 +557,7 @@ static const VMStateDescription vmstate_designware_pcie_viewport = {
.name = "designware-pcie-viewport",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT64(base, DesignwarePCIEViewport),
VMSTATE_UINT64(target, DesignwarePCIEViewport),
VMSTATE_UINT32(limit, DesignwarePCIEViewport),
Expand All @@ -570,7 +570,7 @@ static const VMStateDescription vmstate_designware_pcie_root = {
.name = "designware-pcie-root",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(parent_obj, PCIBridge),
VMSTATE_UINT32(atu_viewport, DesignwarePCIERoot),
VMSTATE_STRUCT_2DARRAY(viewports,
Expand Down Expand Up @@ -718,7 +718,7 @@ static const VMStateDescription vmstate_designware_pcie_host = {
.name = "designware-pcie-host",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_STRUCT(root,
DesignwarePCIEHost,
1,
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/dino.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static const VMStateDescription vmstate_dino = {
.name = "Dino",
.version_id = 2,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(iar0, DinoState),
VMSTATE_UINT32(iar1, DinoState),
VMSTATE_UINT32(imr, DinoState),
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/gpex.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static const VMStateDescription vmstate_gpex_root = {
.name = "gpex_root",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(parent_obj, GPEXRootState),
VMSTATE_END_OF_LIST()
}
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/gt64120.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ static const VMStateDescription vmstate_gt64120 = {
.version_id = 1,
.minimum_version_id = 1,
.post_load = gt64120_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32_ARRAY(regs, GT64120State, GT_REGS),
VMSTATE_END_OF_LIST()
}
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/i440fx.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static const VMStateDescription vmstate_i440fx = {
.version_id = 3,
.minimum_version_id = 3,
.post_load = i440fx_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(parent_obj, PCII440FXState),
/* Used to be smm_enabled, which was basically always zero because
* SeaBIOS hardly uses SMM. SMRAM is now handled by CPU code.
Expand Down
6 changes: 3 additions & 3 deletions hw/pci-host/ppce500.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ static const VMStateDescription vmstate_pci_outbound = {
.name = "pci_outbound",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(potar, struct pci_outbound),
VMSTATE_UINT32(potear, struct pci_outbound),
VMSTATE_UINT32(powbar, struct pci_outbound),
Expand All @@ -392,7 +392,7 @@ static const VMStateDescription vmstate_pci_inbound = {
.name = "pci_inbound",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32(pitar, struct pci_inbound),
VMSTATE_UINT32(piwbar, struct pci_inbound),
VMSTATE_UINT32(piwbear, struct pci_inbound),
Expand All @@ -405,7 +405,7 @@ static const VMStateDescription vmstate_ppce500_pci = {
.name = "ppce500_pci",
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_STRUCT_ARRAY(pob, PPCE500PCIState, PPCE500_PCI_NR_POBS, 1,
vmstate_pci_outbound, struct pci_outbound),
VMSTATE_STRUCT_ARRAY(pib, PPCE500PCIState, PPCE500_PCI_NR_PIBS, 1,
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/q35.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ static const VMStateDescription vmstate_mch = {
.version_id = 1,
.minimum_version_id = 1,
.post_load = mch_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(parent_obj, MCHPCIState),
/* Used to be smm_enabled, which was basically always zero because
* SeaBIOS hardly uses SMM. SMRAM is now handled by CPU code.
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/raven.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ static const VMStateDescription vmstate_raven = {
.name = "raven",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(dev, RavenPCIState),
VMSTATE_END_OF_LIST()
},
Expand Down
2 changes: 1 addition & 1 deletion hw/pci-host/versatile.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static const VMStateDescription pci_vpb_vmstate = {
.version_id = 1,
.minimum_version_id = 1,
.post_load = pci_vpb_post_load,
.fields = (VMStateField[]) {
.fields = (const VMStateField[]) {
VMSTATE_UINT32_ARRAY(imap, PCIVPBState, 3),
VMSTATE_UINT32_ARRAY(smap, PCIVPBState, 3),
VMSTATE_UINT32(selfid, PCIVPBState),
Expand Down

0 comments on commit e2bd53a

Please sign in to comment.