Message ID | 20210313171150.2122409-2-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw: Constify VMStateDescription | expand |
Le 13/03/2021 à 18:11, Philippe Mathieu-Daudé a écrit : > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > hw/arm/highbank.c | 2 +- > hw/arm/pxa2xx_pic.c | 2 +- > hw/arm/spitz.c | 4 ++-- > hw/arm/strongarm.c | 2 +- > hw/arm/z2.c | 4 ++-- > hw/dma/pxa2xx_dma.c | 4 ++-- > hw/misc/mst_fpga.c | 2 +- > 7 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c > index bf886268c57..5afdd28b35c 100644 > --- a/hw/arm/highbank.c > +++ b/hw/arm/highbank.c > @@ -170,7 +170,7 @@ struct HighbankRegsState { > uint32_t regs[NUM_REGS]; > }; > > -static VMStateDescription vmstate_highbank_regs = { > +static const VMStateDescription vmstate_highbank_regs = { > .name = "highbank-regs", > .version_id = 0, > .minimum_version_id = 0, > diff --git a/hw/arm/pxa2xx_pic.c b/hw/arm/pxa2xx_pic.c > index cf6cb2a373a..ed032fed548 100644 > --- a/hw/arm/pxa2xx_pic.c > +++ b/hw/arm/pxa2xx_pic.c > @@ -301,7 +301,7 @@ DeviceState *pxa2xx_pic_init(hwaddr base, ARMCPU *cpu) > return dev; > } > > -static VMStateDescription vmstate_pxa2xx_pic_regs = { > +static const VMStateDescription vmstate_pxa2xx_pic_regs = { > .name = "pxa2xx_pic", > .version_id = 0, > .minimum_version_id = 0, > diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c > index 6b3bf9828bc..b45a929cbd9 100644 > --- a/hw/arm/spitz.c > +++ b/hw/arm/spitz.c > @@ -1134,7 +1134,7 @@ static bool is_version_0(void *opaque, int version_id) > return version_id == 0; > } > > -static VMStateDescription vmstate_sl_nand_info = { > +static const VMStateDescription vmstate_sl_nand_info = { > .name = "sl-nand", > .version_id = 0, > .minimum_version_id = 0, > @@ -1170,7 +1170,7 @@ static const TypeInfo sl_nand_info = { > .class_init = sl_nand_class_init, > }; > > -static VMStateDescription vmstate_spitz_kbd = { > +static const VMStateDescription vmstate_spitz_kbd = { > .name = "spitz-keyboard", > .version_id = 1, > .minimum_version_id = 0, > diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c > index c7ca54bceaa..e3e3ea61634 100644 > --- a/hw/arm/strongarm.c > +++ b/hw/arm/strongarm.c > @@ -207,7 +207,7 @@ static int strongarm_pic_post_load(void *opaque, int version_id) > return 0; > } > > -static VMStateDescription vmstate_strongarm_pic_regs = { > +static const VMStateDescription vmstate_strongarm_pic_regs = { > .name = "strongarm_pic", > .version_id = 0, > .minimum_version_id = 0, > diff --git a/hw/arm/z2.c b/hw/arm/z2.c > index 5099bd83802..9c1e876207b 100644 > --- a/hw/arm/z2.c > +++ b/hw/arm/z2.c > @@ -162,7 +162,7 @@ static void zipit_lcd_realize(SSIPeripheral *dev, Error **errp) > z->pos = 0; > } > > -static VMStateDescription vmstate_zipit_lcd_state = { > +static const VMStateDescription vmstate_zipit_lcd_state = { > .name = "zipit-lcd", > .version_id = 2, > .minimum_version_id = 2, > @@ -268,7 +268,7 @@ static uint8_t aer915_recv(I2CSlave *slave) > return retval; > } > > -static VMStateDescription vmstate_aer915_state = { > +static const VMStateDescription vmstate_aer915_state = { > .name = "aer915", > .version_id = 1, > .minimum_version_id = 1, > diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c > index b3707ff3de2..fa896f7edf7 100644 > --- a/hw/dma/pxa2xx_dma.c > +++ b/hw/dma/pxa2xx_dma.c > @@ -525,7 +525,7 @@ static bool is_version_0(void *opaque, int version_id) > return version_id == 0; > } > > -static VMStateDescription vmstate_pxa2xx_dma_chan = { > +static const VMStateDescription vmstate_pxa2xx_dma_chan = { > .name = "pxa2xx_dma_chan", > .version_id = 1, > .minimum_version_id = 1, > @@ -540,7 +540,7 @@ static VMStateDescription vmstate_pxa2xx_dma_chan = { > }, > }; > > -static VMStateDescription vmstate_pxa2xx_dma = { > +static const VMStateDescription vmstate_pxa2xx_dma = { > .name = "pxa2xx_dma", > .version_id = 1, > .minimum_version_id = 0, > diff --git a/hw/misc/mst_fpga.c b/hw/misc/mst_fpga.c > index edfc35d5f0f..2aaadfa9668 100644 > --- a/hw/misc/mst_fpga.c > +++ b/hw/misc/mst_fpga.c > @@ -222,7 +222,7 @@ static void mst_fpga_init(Object *obj) > sysbus_init_mmio(sbd, &s->iomem); > } > > -static VMStateDescription vmstate_mst_fpga_regs = { > +static const VMStateDescription vmstate_mst_fpga_regs = { > .name = "mainstone_fpga", > .version_id = 0, > .minimum_version_id = 0, > Applied to my trivial-patches branch. Thanks, Laurent
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index bf886268c57..5afdd28b35c 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -170,7 +170,7 @@ struct HighbankRegsState { uint32_t regs[NUM_REGS]; }; -static VMStateDescription vmstate_highbank_regs = { +static const VMStateDescription vmstate_highbank_regs = { .name = "highbank-regs", .version_id = 0, .minimum_version_id = 0, diff --git a/hw/arm/pxa2xx_pic.c b/hw/arm/pxa2xx_pic.c index cf6cb2a373a..ed032fed548 100644 --- a/hw/arm/pxa2xx_pic.c +++ b/hw/arm/pxa2xx_pic.c @@ -301,7 +301,7 @@ DeviceState *pxa2xx_pic_init(hwaddr base, ARMCPU *cpu) return dev; } -static VMStateDescription vmstate_pxa2xx_pic_regs = { +static const VMStateDescription vmstate_pxa2xx_pic_regs = { .name = "pxa2xx_pic", .version_id = 0, .minimum_version_id = 0, diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index 6b3bf9828bc..b45a929cbd9 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -1134,7 +1134,7 @@ static bool is_version_0(void *opaque, int version_id) return version_id == 0; } -static VMStateDescription vmstate_sl_nand_info = { +static const VMStateDescription vmstate_sl_nand_info = { .name = "sl-nand", .version_id = 0, .minimum_version_id = 0, @@ -1170,7 +1170,7 @@ static const TypeInfo sl_nand_info = { .class_init = sl_nand_class_init, }; -static VMStateDescription vmstate_spitz_kbd = { +static const VMStateDescription vmstate_spitz_kbd = { .name = "spitz-keyboard", .version_id = 1, .minimum_version_id = 0, diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index c7ca54bceaa..e3e3ea61634 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -207,7 +207,7 @@ static int strongarm_pic_post_load(void *opaque, int version_id) return 0; } -static VMStateDescription vmstate_strongarm_pic_regs = { +static const VMStateDescription vmstate_strongarm_pic_regs = { .name = "strongarm_pic", .version_id = 0, .minimum_version_id = 0, diff --git a/hw/arm/z2.c b/hw/arm/z2.c index 5099bd83802..9c1e876207b 100644 --- a/hw/arm/z2.c +++ b/hw/arm/z2.c @@ -162,7 +162,7 @@ static void zipit_lcd_realize(SSIPeripheral *dev, Error **errp) z->pos = 0; } -static VMStateDescription vmstate_zipit_lcd_state = { +static const VMStateDescription vmstate_zipit_lcd_state = { .name = "zipit-lcd", .version_id = 2, .minimum_version_id = 2, @@ -268,7 +268,7 @@ static uint8_t aer915_recv(I2CSlave *slave) return retval; } -static VMStateDescription vmstate_aer915_state = { +static const VMStateDescription vmstate_aer915_state = { .name = "aer915", .version_id = 1, .minimum_version_id = 1, diff --git a/hw/dma/pxa2xx_dma.c b/hw/dma/pxa2xx_dma.c index b3707ff3de2..fa896f7edf7 100644 --- a/hw/dma/pxa2xx_dma.c +++ b/hw/dma/pxa2xx_dma.c @@ -525,7 +525,7 @@ static bool is_version_0(void *opaque, int version_id) return version_id == 0; } -static VMStateDescription vmstate_pxa2xx_dma_chan = { +static const VMStateDescription vmstate_pxa2xx_dma_chan = { .name = "pxa2xx_dma_chan", .version_id = 1, .minimum_version_id = 1, @@ -540,7 +540,7 @@ static VMStateDescription vmstate_pxa2xx_dma_chan = { }, }; -static VMStateDescription vmstate_pxa2xx_dma = { +static const VMStateDescription vmstate_pxa2xx_dma = { .name = "pxa2xx_dma", .version_id = 1, .minimum_version_id = 0, diff --git a/hw/misc/mst_fpga.c b/hw/misc/mst_fpga.c index edfc35d5f0f..2aaadfa9668 100644 --- a/hw/misc/mst_fpga.c +++ b/hw/misc/mst_fpga.c @@ -222,7 +222,7 @@ static void mst_fpga_init(Object *obj) sysbus_init_mmio(sbd, &s->iomem); } -static VMStateDescription vmstate_mst_fpga_regs = { +static const VMStateDescription vmstate_mst_fpga_regs = { .name = "mainstone_fpga", .version_id = 0, .minimum_version_id = 0,
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/arm/highbank.c | 2 +- hw/arm/pxa2xx_pic.c | 2 +- hw/arm/spitz.c | 4 ++-- hw/arm/strongarm.c | 2 +- hw/arm/z2.c | 4 ++-- hw/dma/pxa2xx_dma.c | 4 ++-- hw/misc/mst_fpga.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-)