[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 71/71] docs: Constify VMstate in examples
From: |
Richard Henderson |
Subject: |
[PATCH v2 71/71] docs: Constify VMstate in examples |
Date: |
Thu, 21 Dec 2023 14:16:52 +1100 |
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
docs/devel/clocks.rst | 2 +-
docs/devel/migration.rst | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/devel/clocks.rst b/docs/devel/clocks.rst
index 675fbeb6ab..c4d14bde04 100644
--- a/docs/devel/clocks.rst
+++ b/docs/devel/clocks.rst
@@ -502,7 +502,7 @@ This is typically used to migrate an input clock state. For
example:
VMStateDescription my_device_vmstate = {
.name = "my_device",
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
[...], /* other migrated fields */
VMSTATE_CLOCK(clk, MyDeviceState),
VMSTATE_END_OF_LIST()
diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst
index ec55089b25..95351ba51f 100644
--- a/docs/devel/migration.rst
+++ b/docs/devel/migration.rst
@@ -158,7 +158,7 @@ An example (from hw/input/pckbd.c)
.name = "pckbd",
.version_id = 3,
.minimum_version_id = 3,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
VMSTATE_UINT8(write_cmd, KBDState),
VMSTATE_UINT8(status, KBDState),
VMSTATE_UINT8(mode, KBDState),
@@ -294,7 +294,7 @@ Example:
.pre_save = ide_drive_pio_pre_save,
.post_load = ide_drive_pio_post_load,
.needed = ide_drive_pio_state_needed,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
VMSTATE_INT32(req_nb_sectors, IDEState),
VMSTATE_VARRAY_INT32(io_buffer, IDEState, io_buffer_total_len, 1,
vmstate_info_uint8, uint8_t),
@@ -312,11 +312,11 @@ Example:
.version_id = 3,
.minimum_version_id = 0,
.post_load = ide_drive_post_load,
- .fields = (VMStateField[]) {
+ .fields = (const VMStateField[]) {
.... several fields ....
VMSTATE_END_OF_LIST()
},
- .subsections = (const VMStateDescription*[]) {
+ .subsections = (const VMStateDescription * const []) {
&vmstate_ide_drive_pio_state,
NULL
}
--
2.34.1
- [PATCH v2 63/71] audio: Constify VMState, (continued)
- [PATCH v2 63/71] audio: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 64/71] backends: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 60/71] hw/virtio: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 62/71] hw/misc/macio: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 65/71] cpu-target: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 66/71] migration: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 68/71] replay: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 69/71] util/fifo8: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 67/71] system: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 70/71] tests/unit/test-vmstate: Constify VMState, Richard Henderson, 2023/12/20
- [PATCH v2 71/71] docs: Constify VMstate in examples,
Richard Henderson <=