* [PATCH 0/3] hw: Constify VMStateDescription
@ 2021-03-13 17:11 Philippe Mathieu-Daudé
2021-03-13 17:11 ` [PATCH 1/3] hw/arm: " Philippe Mathieu-Daudé
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-13 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial,
Philippe Mathieu-Daudé,
qemu-arm, Gerd Hoffmann
VMStateDescription isn't supposed to be modified.
Philippe Mathieu-Daudé (3):
hw/arm: Constify VMStateDescription
hw/display/qxl: Constify VMStateDescription
hw/usb: Constify VMStateDescription
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/display/qxl.c | 8 ++++----
hw/dma/pxa2xx_dma.c | 4 ++--
hw/misc/mst_fpga.c | 2 +-
hw/usb/ccid-card-passthru.c | 2 +-
hw/usb/dev-smartcard-reader.c | 8 ++++----
10 files changed, 19 insertions(+), 19 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/3] hw/arm: Constify VMStateDescription
2021-03-13 17:11 [PATCH 0/3] hw: Constify VMStateDescription Philippe Mathieu-Daudé
@ 2021-03-13 17:11 ` Philippe Mathieu-Daudé
2021-04-30 16:16 ` Laurent Vivier
2021-03-13 17:11 ` [PATCH 2/3] hw/display/qxl: " Philippe Mathieu-Daudé
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-13 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial,
Philippe Mathieu-Daudé,
qemu-arm, Gerd Hoffmann
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,
--
2.26.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/3] hw/display/qxl: Constify VMStateDescription
2021-03-13 17:11 [PATCH 0/3] hw: Constify VMStateDescription Philippe Mathieu-Daudé
2021-03-13 17:11 ` [PATCH 1/3] hw/arm: " Philippe Mathieu-Daudé
@ 2021-03-13 17:11 ` Philippe Mathieu-Daudé
2021-04-30 16:17 ` Laurent Vivier
2021-03-13 17:11 ` [PATCH 3/3] hw/usb: " Philippe Mathieu-Daudé
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-13 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial,
Philippe Mathieu-Daudé,
qemu-arm, Gerd Hoffmann
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/display/qxl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 93907e82a33..2ba75637ec3 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2384,7 +2384,7 @@ static bool qxl_monitors_config_needed(void *opaque)
}
-static VMStateDescription qxl_memslot = {
+static const VMStateDescription qxl_memslot = {
.name = "qxl-memslot",
.version_id = QXL_SAVE_VERSION,
.minimum_version_id = QXL_SAVE_VERSION,
@@ -2396,7 +2396,7 @@ static VMStateDescription qxl_memslot = {
}
};
-static VMStateDescription qxl_surface = {
+static const VMStateDescription qxl_surface = {
.name = "qxl-surface",
.version_id = QXL_SAVE_VERSION,
.minimum_version_id = QXL_SAVE_VERSION,
@@ -2414,7 +2414,7 @@ static VMStateDescription qxl_surface = {
}
};
-static VMStateDescription qxl_vmstate_monitors_config = {
+static const VMStateDescription qxl_vmstate_monitors_config = {
.name = "qxl/monitors-config",
.version_id = 1,
.minimum_version_id = 1,
@@ -2425,7 +2425,7 @@ static VMStateDescription qxl_vmstate_monitors_config = {
},
};
-static VMStateDescription qxl_vmstate = {
+static const VMStateDescription qxl_vmstate = {
.name = "qxl",
.version_id = QXL_SAVE_VERSION,
.minimum_version_id = QXL_SAVE_VERSION,
--
2.26.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/3] hw/usb: Constify VMStateDescription
2021-03-13 17:11 [PATCH 0/3] hw: Constify VMStateDescription Philippe Mathieu-Daudé
2021-03-13 17:11 ` [PATCH 1/3] hw/arm: " Philippe Mathieu-Daudé
2021-03-13 17:11 ` [PATCH 2/3] hw/display/qxl: " Philippe Mathieu-Daudé
@ 2021-03-13 17:11 ` Philippe Mathieu-Daudé
2021-04-30 16:19 ` Laurent Vivier
2021-03-13 17:24 ` [PATCH 0/3] hw: " Richard Henderson
2021-03-15 9:05 ` Keqian Zhu
4 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-13 17:11 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial,
Philippe Mathieu-Daudé,
qemu-arm, Gerd Hoffmann
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/usb/ccid-card-passthru.c | 2 +-
hw/usb/dev-smartcard-reader.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index c1a90fcc7a5..7212d0d7fb5 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -374,7 +374,7 @@ static void passthru_realize(CCIDCardState *base, Error **errp)
card->atr_length = sizeof(DEFAULT_ATR);
}
-static VMStateDescription passthru_vmstate = {
+static const VMStateDescription passthru_vmstate = {
.name = "ccid-card-passthru",
.version_id = 1,
.minimum_version_id = 1,
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 80109fa5516..b3845ccdc14 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1365,7 +1365,7 @@ static int ccid_pre_save(void *opaque)
return 0;
}
-static VMStateDescription bulk_in_vmstate = {
+static const VMStateDescription bulk_in_vmstate = {
.name = "CCID BulkIn state",
.version_id = 1,
.minimum_version_id = 1,
@@ -1377,7 +1377,7 @@ static VMStateDescription bulk_in_vmstate = {
}
};
-static VMStateDescription answer_vmstate = {
+static const VMStateDescription answer_vmstate = {
.name = "CCID Answer state",
.version_id = 1,
.minimum_version_id = 1,
@@ -1388,7 +1388,7 @@ static VMStateDescription answer_vmstate = {
}
};
-static VMStateDescription usb_device_vmstate = {
+static const VMStateDescription usb_device_vmstate = {
.name = "usb_device",
.version_id = 1,
.minimum_version_id = 1,
@@ -1400,7 +1400,7 @@ static VMStateDescription usb_device_vmstate = {
}
};
-static VMStateDescription ccid_vmstate = {
+static const VMStateDescription ccid_vmstate = {
.name = "usb-ccid",
.version_id = 1,
.minimum_version_id = 1,
--
2.26.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] hw: Constify VMStateDescription
2021-03-13 17:11 [PATCH 0/3] hw: Constify VMStateDescription Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2021-03-13 17:11 ` [PATCH 3/3] hw/usb: " Philippe Mathieu-Daudé
@ 2021-03-13 17:24 ` Richard Henderson
2021-03-15 9:05 ` Keqian Zhu
4 siblings, 0 replies; 11+ messages in thread
From: Richard Henderson @ 2021-03-13 17:24 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-trivial, Peter Maydell, qemu-arm, Gerd Hoffmann, Rob Herring
On 3/13/21 11:11 AM, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (3):
> hw/arm: Constify VMStateDescription
> hw/display/qxl: Constify VMStateDescription
> hw/usb: Constify VMStateDescription
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] hw: Constify VMStateDescription
2021-03-13 17:11 [PATCH 0/3] hw: Constify VMStateDescription Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2021-03-13 17:24 ` [PATCH 0/3] hw: " Richard Henderson
@ 2021-03-15 9:05 ` Keqian Zhu
2021-04-08 13:22 ` Philippe Mathieu-Daudé
4 siblings, 1 reply; 11+ messages in thread
From: Keqian Zhu @ 2021-03-15 9:05 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial, qemu-arm, Gerd Hoffmann
Hi Philippe,
It seems that vmstate_ecc_state and vmstate_x86_cpu can also be constified.
Found by <git grep "VMStateDescription" | grep -v "const">.
Thanks,
Keqian
On 2021/3/14 1:11, Philippe Mathieu-Daudé wrote:
> VMStateDescription isn't supposed to be modified.
>
>
>
> Philippe Mathieu-Daudé (3):
>
> hw/arm: Constify VMStateDescription
>
> hw/display/qxl: Constify VMStateDescription
>
> hw/usb: Constify VMStateDescription
>
>
>
> 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/display/qxl.c | 8 ++++----
>
> hw/dma/pxa2xx_dma.c | 4 ++--
>
> hw/misc/mst_fpga.c | 2 +-
>
> hw/usb/ccid-card-passthru.c | 2 +-
>
> hw/usb/dev-smartcard-reader.c | 8 ++++----
>
> 10 files changed, 19 insertions(+), 19 deletions(-)
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] hw: Constify VMStateDescription
2021-03-15 9:05 ` Keqian Zhu
@ 2021-04-08 13:22 ` Philippe Mathieu-Daudé
2021-04-08 13:46 ` Keqian Zhu
0 siblings, 1 reply; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-08 13:22 UTC (permalink / raw)
To: Keqian Zhu, qemu-devel
Cc: qemu-trivial, Peter Maydell, qemu-arm, Gerd Hoffmann, Rob Herring
On 3/15/21 10:05 AM, Keqian Zhu wrote:
> Hi Philippe,
>
> It seems that vmstate_ecc_state and vmstate_x86_cpu can also be constified.
> Found by <git grep "VMStateDescription" | grep -v "const">.
Correct (I only searched for the static ones).
Do you mind sending a patch?
>
> Thanks,
> Keqian
>
> On 2021/3/14 1:11, Philippe Mathieu-Daudé wrote:
>> VMStateDescription isn't supposed to be modified.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] hw: Constify VMStateDescription
2021-04-08 13:22 ` Philippe Mathieu-Daudé
@ 2021-04-08 13:46 ` Keqian Zhu
0 siblings, 0 replies; 11+ messages in thread
From: Keqian Zhu @ 2021-04-08 13:46 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-trivial, Peter Maydell, qemu-arm, Gerd Hoffmann, Rob Herring
On 2021/4/8 21:22, Philippe Mathieu-Daudé wrote:
> On 3/15/21 10:05 AM, Keqian Zhu wrote:
>> Hi Philippe,
>>
>> It seems that vmstate_ecc_state and vmstate_x86_cpu can also be constified.
>> Found by <git grep "VMStateDescription" | grep -v "const">.
>
> Correct (I only searched for the static ones).
>
> Do you mind sending a patch?
OK, I'll do. :)
BRs,
Keqian
>
>>
>> Thanks,
>> Keqian
>>
>> On 2021/3/14 1:11, Philippe Mathieu-Daudé wrote:
>>> VMStateDescription isn't supposed to be modified.
> .
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] hw/arm: Constify VMStateDescription
2021-03-13 17:11 ` [PATCH 1/3] hw/arm: " Philippe Mathieu-Daudé
@ 2021-04-30 16:16 ` Laurent Vivier
0 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2021-04-30 16:16 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial, qemu-arm, Gerd Hoffmann
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] hw/display/qxl: Constify VMStateDescription
2021-03-13 17:11 ` [PATCH 2/3] hw/display/qxl: " Philippe Mathieu-Daudé
@ 2021-04-30 16:17 ` Laurent Vivier
0 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2021-04-30 16:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial, qemu-arm, Gerd Hoffmann
Le 13/03/2021 à 18:11, Philippe Mathieu-Daudé a écrit :
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/display/qxl.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 93907e82a33..2ba75637ec3 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -2384,7 +2384,7 @@ static bool qxl_monitors_config_needed(void *opaque)
> }
>
>
> -static VMStateDescription qxl_memslot = {
> +static const VMStateDescription qxl_memslot = {
> .name = "qxl-memslot",
> .version_id = QXL_SAVE_VERSION,
> .minimum_version_id = QXL_SAVE_VERSION,
> @@ -2396,7 +2396,7 @@ static VMStateDescription qxl_memslot = {
> }
> };
>
> -static VMStateDescription qxl_surface = {
> +static const VMStateDescription qxl_surface = {
> .name = "qxl-surface",
> .version_id = QXL_SAVE_VERSION,
> .minimum_version_id = QXL_SAVE_VERSION,
> @@ -2414,7 +2414,7 @@ static VMStateDescription qxl_surface = {
> }
> };
>
> -static VMStateDescription qxl_vmstate_monitors_config = {
> +static const VMStateDescription qxl_vmstate_monitors_config = {
> .name = "qxl/monitors-config",
> .version_id = 1,
> .minimum_version_id = 1,
> @@ -2425,7 +2425,7 @@ static VMStateDescription qxl_vmstate_monitors_config = {
> },
> };
>
> -static VMStateDescription qxl_vmstate = {
> +static const VMStateDescription qxl_vmstate = {
> .name = "qxl",
> .version_id = QXL_SAVE_VERSION,
> .minimum_version_id = QXL_SAVE_VERSION,
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] hw/usb: Constify VMStateDescription
2021-03-13 17:11 ` [PATCH 3/3] hw/usb: " Philippe Mathieu-Daudé
@ 2021-04-30 16:19 ` Laurent Vivier
0 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2021-04-30 16:19 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Peter Maydell, Rob Herring, qemu-trivial, qemu-arm, Gerd Hoffmann
Le 13/03/2021 à 18:11, Philippe Mathieu-Daudé a écrit :
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/usb/ccid-card-passthru.c | 2 +-
> hw/usb/dev-smartcard-reader.c | 8 ++++----
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
> index c1a90fcc7a5..7212d0d7fb5 100644
> --- a/hw/usb/ccid-card-passthru.c
> +++ b/hw/usb/ccid-card-passthru.c
> @@ -374,7 +374,7 @@ static void passthru_realize(CCIDCardState *base, Error **errp)
> card->atr_length = sizeof(DEFAULT_ATR);
> }
>
> -static VMStateDescription passthru_vmstate = {
> +static const VMStateDescription passthru_vmstate = {
> .name = "ccid-card-passthru",
> .version_id = 1,
> .minimum_version_id = 1,
> diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
> index 80109fa5516..b3845ccdc14 100644
> --- a/hw/usb/dev-smartcard-reader.c
> +++ b/hw/usb/dev-smartcard-reader.c
> @@ -1365,7 +1365,7 @@ static int ccid_pre_save(void *opaque)
> return 0;
> }
>
> -static VMStateDescription bulk_in_vmstate = {
> +static const VMStateDescription bulk_in_vmstate = {
> .name = "CCID BulkIn state",
> .version_id = 1,
> .minimum_version_id = 1,
> @@ -1377,7 +1377,7 @@ static VMStateDescription bulk_in_vmstate = {
> }
> };
>
> -static VMStateDescription answer_vmstate = {
> +static const VMStateDescription answer_vmstate = {
> .name = "CCID Answer state",
> .version_id = 1,
> .minimum_version_id = 1,
> @@ -1388,7 +1388,7 @@ static VMStateDescription answer_vmstate = {
> }
> };
>
> -static VMStateDescription usb_device_vmstate = {
> +static const VMStateDescription usb_device_vmstate = {
> .name = "usb_device",
> .version_id = 1,
> .minimum_version_id = 1,
> @@ -1400,7 +1400,7 @@ static VMStateDescription usb_device_vmstate = {
> }
> };
>
> -static VMStateDescription ccid_vmstate = {
> +static const VMStateDescription ccid_vmstate = {
> .name = "usb-ccid",
> .version_id = 1,
> .minimum_version_id = 1,
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-04-30 16:30 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 17:11 [PATCH 0/3] hw: Constify VMStateDescription Philippe Mathieu-Daudé
2021-03-13 17:11 ` [PATCH 1/3] hw/arm: " Philippe Mathieu-Daudé
2021-04-30 16:16 ` Laurent Vivier
2021-03-13 17:11 ` [PATCH 2/3] hw/display/qxl: " Philippe Mathieu-Daudé
2021-04-30 16:17 ` Laurent Vivier
2021-03-13 17:11 ` [PATCH 3/3] hw/usb: " Philippe Mathieu-Daudé
2021-04-30 16:19 ` Laurent Vivier
2021-03-13 17:24 ` [PATCH 0/3] hw: " Richard Henderson
2021-03-15 9:05 ` Keqian Zhu
2021-04-08 13:22 ` Philippe Mathieu-Daudé
2021-04-08 13:46 ` Keqian Zhu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.