On 6 June 2015 at 00:18, Peter Crosthwaite <peter.crosthwa...@xilinx.com> wrote: > On Thu, May 28, 2015 at 5:09 AM, Peter Maydell <peter.mayd...@linaro.org> > wrote: >> The pxa2xx-ssp device is already a QOM device but is still >> using the old-style register_savevm(); convert to VMState. >> >> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> >> --- >> hw/arm/pxa2xx.c | 89 >> +++++++++++++++++++++------------------------------------ >> 1 file changed, 33 insertions(+), 56 deletions(-) >> >> diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c >> index 770902f..09401f9 100644 >> --- a/hw/arm/pxa2xx.c >> +++ b/hw/arm/pxa2xx.c >> @@ -457,7 +457,7 @@ typedef struct { >> >> MemoryRegion iomem; >> qemu_irq irq; >> - int enable; >> + uint32_t enable; >> SSIBus *bus; >> >> uint32_t sscr[2]; >> @@ -470,10 +470,39 @@ typedef struct { >> uint8_t ssacd; >> >> uint32_t rx_fifo[16]; >> - int rx_level; >> - int rx_start; >> + uint32_t rx_level; >> + uint32_t rx_start; >> } PXA2xxSSPState; >> >> +static bool pxa2xx_ssp_vmstate_validate(void *opaque, int version_id) >> +{ >> + PXA2xxSSPState *s = opaque; >> + >> + return s->rx_start < sizeof(s->rx_fifo); > > Does this need to be ARRAY_SIZE to account for unit32_t indexing?
Yes, good catch. -- PMM