[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 003/124] savevm: Remove all the unneded version_
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 003/124] savevm: Remove all the unneded version_minimum_id_old (ppc) |
Date: |
Wed, 04 Jun 2014 13:35:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Juan Quintela <address@hidden> wrote:
> After previous Peter patch, they are redundant. This way we don't asign them
> except when needed. Once there, there were lots of case where the ".fields"
> indentation was wrong:
>
> .fields = (VMStateField []) {
> and
> .fields = (VMStateField []) {
>
> Change all the combinations to:
>
> .fields = (VMStateField[]){
>
> The biggest problem (appart of aesthetics) was that checkpatch complained
> when we copy&pasted the code from one place to another.
>
> Signed-off-by: Juan Quintela <address@hidden>
Could you ack/review this?
Changes are trivial, only problem is that patch is big.
Thanks, Juan.
> ---
> hw/char/escc.c | 6 ++----
> hw/char/spapr_vty.c | 3 +--
> hw/intc/heathrow_pic.c | 6 ++----
> hw/intc/xics.c | 9 +++------
> hw/net/spapr_llan.c | 3 +--
> hw/pci-host/ppce500.c | 9 +++------
> hw/ppc/ppc4xx_pci.c | 9 +++------
> hw/ppc/spapr.c | 3 +--
> hw/ppc/spapr_iommu.c | 3 +--
> hw/ppc/spapr_pci.c | 9 +++------
> hw/ppc/spapr_vio.c | 3 +--
> hw/scsi/spapr_vscsi.c | 6 ++----
> hw/timer/m48t59.c | 3 +--
> target-ppc/machine.c | 38 +++++++++++++-------------------------
> 14 files changed, 37 insertions(+), 73 deletions(-)
>
> diff --git a/hw/char/escc.c b/hw/char/escc.c
> index 6397f6f..4875a2b 100644
> --- a/hw/char/escc.c
> +++ b/hw/char/escc.c
> @@ -658,8 +658,7 @@ static const VMStateDescription vmstate_escc_chn = {
> .name ="escc_chn",
> .version_id = 2,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(vmstate_dummy, ChannelState),
> VMSTATE_UINT32(reg, ChannelState),
> VMSTATE_UINT32(rxint, ChannelState),
> @@ -678,8 +677,7 @@ static const VMStateDescription vmstate_escc = {
> .name ="escc",
> .version_id = 2,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_STRUCT_ARRAY(chn, ESCCState, 2, 2, vmstate_escc_chn,
> ChannelState),
> VMSTATE_END_OF_LIST()
> diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
> index f8a4981..0adf096 100644
> --- a/hw/char/spapr_vty.c
> +++ b/hw/char/spapr_vty.c
> @@ -148,8 +148,7 @@ static const VMStateDescription vmstate_spapr_vty = {
> .name = "spapr_vty",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_SPAPR_VIO(sdev, VIOsPAPRVTYDevice),
>
> VMSTATE_UINT32(in, VIOsPAPRVTYDevice),
> diff --git a/hw/intc/heathrow_pic.c b/hw/intc/heathrow_pic.c
> index 9818f24..9ff3119 100644
> --- a/hw/intc/heathrow_pic.c
> +++ b/hw/intc/heathrow_pic.c
> @@ -159,8 +159,7 @@ static const VMStateDescription vmstate_heathrow_pic_one
> = {
> .name = "heathrow_pic_one",
> .version_id = 0,
> .minimum_version_id = 0,
> - .minimum_version_id_old = 0,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(events, HeathrowPIC),
> VMSTATE_UINT32(mask, HeathrowPIC),
> VMSTATE_UINT32(levels, HeathrowPIC),
> @@ -173,8 +172,7 @@ static const VMStateDescription vmstate_heathrow_pic = {
> .name = "heathrow_pic",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_STRUCT_ARRAY(pics, HeathrowPICS, 2, 1,
> vmstate_heathrow_pic_one, HeathrowPIC),
> VMSTATE_END_OF_LIST()
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index 64aabe7..76dd6f5 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -330,10 +330,9 @@ static const VMStateDescription vmstate_icp_server = {
> .name = "icp/server",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> .pre_save = icp_dispatch_pre_save,
> .post_load = icp_dispatch_post_load,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> /* Sanity check */
> VMSTATE_UINT32(xirr, ICPState),
> VMSTATE_UINT8(pending_priority, ICPState),
> @@ -566,8 +565,7 @@ static const VMStateDescription vmstate_ics_irq = {
> .name = "ics/irq",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(server, ICSIRQState),
> VMSTATE_UINT8(priority, ICSIRQState),
> VMSTATE_UINT8(saved_priority, ICSIRQState),
> @@ -580,10 +578,9 @@ static const VMStateDescription vmstate_ics = {
> .name = "ics",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> .pre_save = ics_dispatch_pre_save,
> .post_load = ics_dispatch_post_load,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> /* Sanity check */
> VMSTATE_UINT32_EQUAL(nr_irqs, ICSState),
>
> diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
> index c433337..2d47df6 100644
> --- a/hw/net/spapr_llan.c
> +++ b/hw/net/spapr_llan.c
> @@ -509,8 +509,7 @@ static const VMStateDescription vmstate_spapr_llan = {
> .name = "spapr_llan",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_SPAPR_VIO(sdev, VIOsPAPRVLANDevice),
> /* LLAN state */
> VMSTATE_BOOL(isopen, VIOsPAPRVLANDevice),
> diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
> index c80b7cb..e12d731 100644
> --- a/hw/pci-host/ppce500.c
> +++ b/hw/pci-host/ppce500.c
> @@ -278,8 +278,7 @@ static const VMStateDescription vmstate_pci_outbound = {
> .name = "pci_outbound",
> .version_id = 0,
> .minimum_version_id = 0,
> - .minimum_version_id_old = 0,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(potar, struct pci_outbound),
> VMSTATE_UINT32(potear, struct pci_outbound),
> VMSTATE_UINT32(powbar, struct pci_outbound),
> @@ -292,8 +291,7 @@ static const VMStateDescription vmstate_pci_inbound = {
> .name = "pci_inbound",
> .version_id = 0,
> .minimum_version_id = 0,
> - .minimum_version_id_old = 0,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(pitar, struct pci_inbound),
> VMSTATE_UINT32(piwbar, struct pci_inbound),
> VMSTATE_UINT32(piwbear, struct pci_inbound),
> @@ -306,8 +304,7 @@ static const VMStateDescription vmstate_ppce500_pci = {
> .name = "ppce500_pci",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField[]) {
> + .fields = (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,
> diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
> index 4cb7851..55a3cab 100644
> --- a/hw/ppc/ppc4xx_pci.c
> +++ b/hw/ppc/ppc4xx_pci.c
> @@ -294,8 +294,7 @@ static const VMStateDescription vmstate_pci_master_map = {
> .name = "pci_master_map",
> .version_id = 0,
> .minimum_version_id = 0,
> - .minimum_version_id_old = 0,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(la, struct PCIMasterMap),
> VMSTATE_UINT32(ma, struct PCIMasterMap),
> VMSTATE_UINT32(pcila, struct PCIMasterMap),
> @@ -308,8 +307,7 @@ static const VMStateDescription vmstate_pci_target_map = {
> .name = "pci_target_map",
> .version_id = 0,
> .minimum_version_id = 0,
> - .minimum_version_id_old = 0,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(ms, struct PCITargetMap),
> VMSTATE_UINT32(la, struct PCITargetMap),
> VMSTATE_END_OF_LIST()
> @@ -320,8 +318,7 @@ static const VMStateDescription vmstate_ppc4xx_pci = {
> .name = "ppc4xx_pci",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_STRUCT_ARRAY(pmm, PPC4xxPCIState, PPC4xx_PCI_NR_PMMS, 1,
> vmstate_pci_master_map,
> struct PCIMasterMap),
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index a11e121..ceae989 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -819,8 +819,7 @@ static const VMStateDescription vmstate_spapr = {
> .name = "spapr",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(next_irq, sPAPREnvironment),
>
> /* RTC offset */
> diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
> index d9fe946..ce15751 100644
> --- a/hw/ppc/spapr_iommu.c
> +++ b/hw/ppc/spapr_iommu.c
> @@ -97,9 +97,8 @@ static const VMStateDescription vmstate_spapr_tce_table = {
> .name = "spapr_iommu",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> .pre_load = spapr_tce_table_pre_load,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> /* Sanity check */
> VMSTATE_UINT32_EQUAL(liobn, sPAPRTCETable),
> VMSTATE_UINT32_EQUAL(window_size, sPAPRTCETable),
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index cbef095..a4a51d4 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -659,8 +659,7 @@ static const VMStateDescription vmstate_spapr_pci_lsi = {
> .name = "spapr_pci/lsi",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32_EQUAL(irq, struct spapr_pci_lsi),
>
> VMSTATE_END_OF_LIST()
> @@ -671,8 +670,7 @@ static const VMStateDescription vmstate_spapr_pci_msi = {
> .name = "spapr_pci/lsi",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(config_addr, struct spapr_pci_msi),
> VMSTATE_UINT32(irq, struct spapr_pci_msi),
> VMSTATE_UINT32(nvec, struct spapr_pci_msi),
> @@ -685,8 +683,7 @@ static const VMStateDescription vmstate_spapr_pci = {
> .name = "spapr_pci",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT64_EQUAL(buid, sPAPRPHBState),
> VMSTATE_UINT32_EQUAL(dma_liobn, sPAPRPHBState),
> VMSTATE_UINT64_EQUAL(mem_win_addr, sPAPRPHBState),
> diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
> index 2ae06a3..bce8d7f 100644
> --- a/hw/ppc/spapr_vio.c
> +++ b/hw/ppc/spapr_vio.c
> @@ -547,8 +547,7 @@ const VMStateDescription vmstate_spapr_vio = {
> .name = "spapr_vio",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> /* Sanity check */
> VMSTATE_UINT32_EQUAL(reg, VIOsPAPRDevice),
> VMSTATE_UINT32_EQUAL(irq, VIOsPAPRDevice),
> diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
> index d4ada4f..f96b7af 100644
> --- a/hw/scsi/spapr_vscsi.c
> +++ b/hw/scsi/spapr_vscsi.c
> @@ -598,8 +598,7 @@ static const VMStateDescription vmstate_spapr_vscsi_req =
> {
> .name = "spapr_vscsi_req",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_BUFFER(crq.raw, vscsi_req),
> VMSTATE_BUFFER(iu.srp.reserved, vscsi_req),
> VMSTATE_UINT32(qtag, vscsi_req),
> @@ -1260,8 +1259,7 @@ static const VMStateDescription vmstate_spapr_vscsi = {
> .name = "spapr_vscsi",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_SPAPR_VIO(vdev, VSCSIState),
> /* VSCSI state */
> /* ???? */
> diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
> index 7cf8684..31509d5 100644
> --- a/hw/timer/m48t59.c
> +++ b/hw/timer/m48t59.c
> @@ -595,8 +595,7 @@ static const VMStateDescription vmstate_m48t59 = {
> .name = "m48t59",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField[]) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT8(lock, M48t59State),
> VMSTATE_UINT16(addr, M48t59State),
> VMSTATE_VBUFFER_UINT32(buffer, M48t59State, 0, NULL, 0, size),
> diff --git a/target-ppc/machine.c b/target-ppc/machine.c
> index 063b379..d7807f8 100644
> --- a/target-ppc/machine.c
> +++ b/target-ppc/machine.c
> @@ -202,8 +202,7 @@ static const VMStateDescription vmstate_fpu = {
> .name = "cpu/fpu",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_FLOAT64_ARRAY(env.fpr, PowerPCCPU, 32),
> VMSTATE_UINTTL(env.fpscr, PowerPCCPU),
> VMSTATE_END_OF_LIST()
> @@ -221,8 +220,7 @@ static const VMStateDescription vmstate_altivec = {
> .name = "cpu/altivec",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_AVR_ARRAY(env.avr, PowerPCCPU, 32),
> VMSTATE_UINT32(env.vscr, PowerPCCPU),
> VMSTATE_END_OF_LIST()
> @@ -240,8 +238,7 @@ static const VMStateDescription vmstate_vsx = {
> .name = "cpu/vsx",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT64_ARRAY(env.vsr, PowerPCCPU, 32),
> VMSTATE_END_OF_LIST()
> },
> @@ -262,8 +259,7 @@ static const VMStateDescription vmstate_sr = {
> .name = "cpu/sr",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINTTL_ARRAY(env.sr, PowerPCCPU, 32),
> VMSTATE_END_OF_LIST()
> },
> @@ -312,8 +308,7 @@ static const VMStateDescription vmstate_slb = {
> .name = "cpu/slb",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_INT32_EQUAL(env.slb_nr, PowerPCCPU),
> VMSTATE_SLB_ARRAY(env.slb, PowerPCCPU, MAX_SLB_ENTRIES),
> VMSTATE_END_OF_LIST()
> @@ -325,8 +320,7 @@ static const VMStateDescription vmstate_tlb6xx_entry = {
> .name = "cpu/tlb6xx_entry",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINTTL(pte0, ppc6xx_tlb_t),
> VMSTATE_UINTTL(pte1, ppc6xx_tlb_t),
> VMSTATE_UINTTL(EPN, ppc6xx_tlb_t),
> @@ -346,8 +340,7 @@ static const VMStateDescription vmstate_tlb6xx = {
> .name = "cpu/tlb6xx",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_INT32_EQUAL(env.nb_tlb, PowerPCCPU),
> VMSTATE_STRUCT_VARRAY_POINTER_INT32(env.tlb.tlb6, PowerPCCPU,
> env.nb_tlb,
> @@ -362,8 +355,7 @@ static const VMStateDescription vmstate_tlbemb_entry = {
> .name = "cpu/tlbemb_entry",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT64(RPN, ppcemb_tlb_t),
> VMSTATE_UINTTL(EPN, ppcemb_tlb_t),
> VMSTATE_UINTTL(PID, ppcemb_tlb_t),
> @@ -394,8 +386,7 @@ static const VMStateDescription vmstate_pbr403 = {
> .name = "cpu/pbr403",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINTTL_ARRAY(env.pb, PowerPCCPU, 4),
> VMSTATE_END_OF_LIST()
> },
> @@ -405,8 +396,7 @@ static const VMStateDescription vmstate_tlbemb = {
> .name = "cpu/tlb6xx",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_INT32_EQUAL(env.nb_tlb, PowerPCCPU),
> VMSTATE_STRUCT_VARRAY_POINTER_INT32(env.tlb.tlbe, PowerPCCPU,
> env.nb_tlb,
> @@ -429,8 +419,7 @@ static const VMStateDescription vmstate_tlbmas_entry = {
> .name = "cpu/tlbmas_entry",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_UINT32(mas8, ppcmas_tlb_t),
> VMSTATE_UINT32(mas1, ppcmas_tlb_t),
> VMSTATE_UINT64(mas2, ppcmas_tlb_t),
> @@ -451,8 +440,7 @@ static const VMStateDescription vmstate_tlbmas = {
> .name = "cpu/tlbmas",
> .version_id = 1,
> .minimum_version_id = 1,
> - .minimum_version_id_old = 1,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> VMSTATE_INT32_EQUAL(env.nb_tlb, PowerPCCPU),
> VMSTATE_STRUCT_VARRAY_POINTER_INT32(env.tlb.tlbm, PowerPCCPU,
> env.nb_tlb,
> @@ -470,7 +458,7 @@ const VMStateDescription vmstate_ppc_cpu = {
> .load_state_old = cpu_load_old,
> .pre_save = cpu_pre_save,
> .post_load = cpu_post_load,
> - .fields = (VMStateField []) {
> + .fields = (VMStateField[]) {
> /* Verify we haven't changed the pvr */
> VMSTATE_UINTTL_EQUAL(env.spr[SPR_PVR], PowerPCCPU),
- Re: [Qemu-devel] [PATCH 003/124] savevm: Remove all the unneded version_minimum_id_old (ppc),
Juan Quintela <=