From d49805aeea558474b18663268b243cee4a520fe8 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Wed, 16 Apr 2014 15:32:32 +0200 Subject: savevm: Remove all the unneeded version_minimum_id_old (x86) After previous Peter patch, they are redundant. This way we don't assign 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 from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another. Signed-off-by: Juan Quintela Acked-by: Alexey Kardashevskiy Reviewed-by: Michael S. Tsirkin --- hw/net/e1000.c | 6 ++---- hw/net/eepro100.c | 3 +-- hw/net/ne2000-isa.c | 3 +-- hw/net/ne2000.c | 6 ++---- hw/net/pcnet-pci.c | 3 +-- hw/net/pcnet.c | 3 +-- hw/net/rtl8139.c | 9 +++------ hw/net/vmxnet3.c | 4 +--- 8 files changed, 12 insertions(+), 25 deletions(-) (limited to 'hw/net') diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 47e077577e..57bdffde08 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -1338,8 +1338,7 @@ static const VMStateDescription vmstate_e1000_mit_state = { .name = "e1000/mit_state", .version_id = 1, .minimum_version_id = 1, - .minimum_version_id_old = 1, - .fields = (VMStateField[]) { + .fields = (VMStateField[]) { VMSTATE_UINT32(mac_reg[RDTR], E1000State), VMSTATE_UINT32(mac_reg[RADV], E1000State), VMSTATE_UINT32(mac_reg[TADV], E1000State), @@ -1353,10 +1352,9 @@ static const VMStateDescription vmstate_e1000 = { .name = "e1000", .version_id = 2, .minimum_version_id = 1, - .minimum_version_id_old = 1, .pre_save = e1000_pre_save, .post_load = e1000_post_load, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, E1000State), VMSTATE_UNUSED_TEST(is_version_1, 4), /* was instance id */ VMSTATE_UNUSED(4), /* Was mmio_base. */ diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index 3b891ca340..aaa3ff2360 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -1784,8 +1784,7 @@ static ssize_t nic_receive(NetClientState *nc, const uint8_t * buf, size_t size) static const VMStateDescription vmstate_eepro100 = { .version_id = 3, .minimum_version_id = 2, - .minimum_version_id_old = 2, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, EEPRO100State), VMSTATE_UNUSED(32), VMSTATE_BUFFER(mult, EEPRO100State), diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c index 0a14f6d1cd..6eb1dac8dc 100644 --- a/hw/net/ne2000-isa.c +++ b/hw/net/ne2000-isa.c @@ -59,8 +59,7 @@ static const VMStateDescription vmstate_isa_ne2000 = { .name = "ne2000", .version_id = 2, .minimum_version_id = 0, - .minimum_version_id_old = 0, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_STRUCT(ne2000, ISANE2000State, 0, vmstate_ne2000, NE2000State), VMSTATE_END_OF_LIST() } diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 4c32e9ec25..d558b8c677 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -615,9 +615,8 @@ const VMStateDescription vmstate_ne2000 = { .name = "ne2000", .version_id = 2, .minimum_version_id = 0, - .minimum_version_id_old = 0, .post_load = ne2000_post_load, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_UINT8_V(rxcr, NE2000State, 2), VMSTATE_UINT8(cmd, NE2000State), VMSTATE_UINT32(start, NE2000State), @@ -645,8 +644,7 @@ static const VMStateDescription vmstate_pci_ne2000 = { .name = "ne2000", .version_id = 3, .minimum_version_id = 3, - .minimum_version_id_old = 3, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(dev, PCINE2000State), VMSTATE_STRUCT(ne2000, PCINE2000State, 0, vmstate_ne2000, NE2000State), VMSTATE_END_OF_LIST() diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index 6a5d8064bb..b25d789d2c 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -241,8 +241,7 @@ static const VMStateDescription vmstate_pci_pcnet = { .name = "pcnet", .version_id = 3, .minimum_version_id = 2, - .minimum_version_id_old = 2, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, PCIPCNetState), VMSTATE_STRUCT(state, PCIPCNetState, 0, vmstate_pcnet, PCNetState), VMSTATE_END_OF_LIST() diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index ebe505784d..5299d52a8f 100644 --- a/hw/net/pcnet.c +++ b/hw/net/pcnet.c @@ -1700,8 +1700,7 @@ const VMStateDescription vmstate_pcnet = { .name = "pcnet", .version_id = 3, .minimum_version_id = 2, - .minimum_version_id_old = 2, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_INT32(rap, PCNetState), VMSTATE_INT32(isr, PCNetState), VMSTATE_INT32(lnkst, PCNetState), diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 5329f44a9d..90bc5ecdd3 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -1358,8 +1358,7 @@ static const VMStateDescription vmstate_tally_counters = { .name = "tally_counters", .version_id = 1, .minimum_version_id = 1, - .minimum_version_id_old = 1, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_UINT64(TxOk, RTL8139TallyCounters), VMSTATE_UINT64(RxOk, RTL8139TallyCounters), VMSTATE_UINT64(TxERR, RTL8139TallyCounters), @@ -3271,8 +3270,7 @@ static const VMStateDescription vmstate_rtl8139_hotplug_ready ={ .name = "rtl8139/hotplug_ready", .version_id = 1, .minimum_version_id = 1, - .minimum_version_id_old = 1, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_END_OF_LIST() } }; @@ -3293,10 +3291,9 @@ static const VMStateDescription vmstate_rtl8139 = { .name = "rtl8139", .version_id = 4, .minimum_version_id = 3, - .minimum_version_id_old = 3, .post_load = rtl8139_post_load, .pre_save = rtl8139_pre_save, - .fields = (VMStateField []) { + .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, RTL8139State), VMSTATE_PARTIAL_BUFFER(phys, RTL8139State, 6), VMSTATE_BUFFER(mult, RTL8139State), diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index f3be4940e1..77bea6f89f 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -2223,7 +2223,6 @@ static const VMStateDescription vmxstate_vmxnet3_mcast_list = { .name = "vmxnet3/mcast_list", .version_id = 1, .minimum_version_id = 1, - .minimum_version_id_old = 1, .pre_load = vmxnet3_mcast_list_pre_load, .fields = (VMStateField[]) { VMSTATE_VBUFFER_UINT32(mcast_list, VMXNET3State, 0, NULL, 0, @@ -2433,10 +2432,9 @@ static const VMStateDescription vmstate_vmxnet3 = { .name = "vmxnet3", .version_id = 1, .minimum_version_id = 1, - .minimum_version_id_old = 1, .pre_save = vmxnet3_pre_save, .post_load = vmxnet3_post_load, - .fields = (VMStateField[]) { + .fields = (VMStateField[]) { VMSTATE_PCI_DEVICE(parent_obj, VMXNET3State), VMSTATE_BOOL(rx_packets_compound, VMXNET3State), VMSTATE_BOOL(rx_vlan_stripping, VMXNET3State), -- cgit v1.2.3