[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 5/8] dp8393x: Migrate registers as array of uint16
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[PATCH v3 5/8] dp8393x: Migrate registers as array of uint16 |
|
Date: |
Sat, 10 Jul 2021 19:49:51 +0200 |
The CAM registers are now arrays of 3 uint16_t. We can avoid using
the VMSTATE_BUFFER_UNSAFE() macro by using VMSTATE_UINT16_2DARRAY()
which is more appropriate.
Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/net/dp8393x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 2c3047c8688..68516241a1f 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -983,10 +983,10 @@ static void dp8393x_realize(DeviceState *dev, Error
**errp)
static const VMStateDescription vmstate_dp8393x = {
.name = "dp8393x",
- .version_id = 0,
- .minimum_version_id = 0,
+ .version_id = 1,
+ .minimum_version_id = 1,
.fields = (VMStateField []) {
- VMSTATE_BUFFER_UNSAFE(cam, dp8393xState, 0, 16 * 3 * 2),
+ VMSTATE_UINT16_2DARRAY(cam, dp8393xState, 16, 3),
VMSTATE_UINT16_ARRAY(regs, dp8393xState, SONIC_REG_COUNT),
VMSTATE_END_OF_LIST()
}
--
2.31.1
- [PATCH v3 0/8] dp8393x: fixes and improvements, Philippe Mathieu-Daudé, 2021/07/10
- [PATCH v3 1/8] dp8393x: Replace address_space_rw(is_write=1) by address_space_write(), Philippe Mathieu-Daudé, 2021/07/10
- [PATCH v3 3/8] dp8393x: Only shift the device registers mapping by 1 bit, Philippe Mathieu-Daudé, 2021/07/10
- [PATCH v3 2/8] dp8393x: Replace 0x40 magic value by SONIC_REG16_COUNT definition, Philippe Mathieu-Daudé, 2021/07/10
- [PATCH v3 4/8] dp8393x: Store CAM registers as 16-bit, Philippe Mathieu-Daudé, 2021/07/10
- [PATCH v3 5/8] dp8393x: Migrate registers as array of uint16,
Philippe Mathieu-Daudé <=
- [PATCH v3 6/8] dp8393x: Store CRC using device configured endianess, Philippe Mathieu-Daudé, 2021/07/10
- [NOTFORMERGE PATCH v3 7/8] dp8393x: Rewrite dp8393x_get() / dp8393x_put(), Philippe Mathieu-Daudé, 2021/07/10
- [NOTFORMERGE PATCH v3 8/8] dp8393x: don't force 32-bit register access, Philippe Mathieu-Daudé, 2021/07/10
- Re: [PATCH v3 0/8] dp8393x: fixes and improvements, Finn Thain, 2021/07/10