[PATCH v2 2/2] migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro

Michael Tokarev posted 2 patches 3 days, 21 hours ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>
[PATCH v2 2/2] migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro
Posted by Michael Tokarev 3 days, 21 hours ago
The only user of this macro was VirtIONet.vlans, which has been
converted to regular VMSTATE_BUFFER.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 include/migration/vmstate.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 63ccaee07a..09f1eefcfb 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -727,15 +727,6 @@ extern const VMStateInfo vmstate_info_qlist;
     .offset     = offsetof(_state, _field),                          \
 }
 
-#define VMSTATE_BUFFER_POINTER_UNSAFE(_field, _state, _version, _size) { \
-    .name       = (stringify(_field)),                               \
-    .version_id = (_version),                                        \
-    .size       = (_size),                                           \
-    .info       = &vmstate_info_buffer,                              \
-    .flags      = VMS_BUFFER|VMS_POINTER,                            \
-    .offset     = offsetof(_state, _field),                          \
-}
-
 /* Allocate a temporary of type 'tmp_type', set tmp->parent to _state
  * and execute the vmsd on the temporary.  Note that we're working with
  * the whole of _state here, not a field within it.
-- 
2.47.3
Re: [PATCH v2 2/2] migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro
Posted by Philippe Mathieu-Daudé 3 days, 20 hours ago
On 23/10/25 15:53, Michael Tokarev wrote:
> The only user of this macro was VirtIONet.vlans, which has been
> converted to regular VMSTATE_BUFFER.
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
>   include/migration/vmstate.h | 9 ---------
>   1 file changed, 9 deletions(-)

Yay!

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Re: [PATCH v2 2/2] migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro
Posted by Peter Xu 3 days, 21 hours ago
On Thu, Oct 23, 2025 at 04:53:10PM +0300, Michael Tokarev wrote:
> The only user of this macro was VirtIONet.vlans, which has been
> converted to regular VMSTATE_BUFFER.
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>

Acked-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu