include/migration: mark vmstate_register() as a legacy function
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 30 Jun 2023 18:04:08 +0000 (19:04 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 3 Jul 2023 11:52:11 +0000 (12:52 +0100)
Mention that QOM-ified devices already have support for registering
the description.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-24-alex.bennee@linaro.org>

include/migration/vmstate.h

index 084f5e784a3fe8afdaa53f354abd7286c40403cd..d1b8abe08dd567cc95b73b567dcdf2c072656aef 100644 (file)
@@ -1209,7 +1209,15 @@ int vmstate_register_with_alias_id(VMStateIf *obj, uint32_t instance_id,
                                    int required_for_version,
                                    Error **errp);
 
-/* Returns: 0 on success, -1 on failure */
+/**
+ * vmstate_register() - legacy function to register state
+ * serialisation description
+ *
+ * New code shouldn't be using this function as QOM-ified devices have
+ * dc->vmsd to store the serialisation description.
+ *
+ * Returns: 0 on success, -1 on failure
+ */
 static inline int vmstate_register(VMStateIf *obj, int instance_id,
                                    const VMStateDescription *vmsd,
                                    void *opaque)