[PATCH] migration/vmstate: Remove unnecessary MemoryRegion forward declaration

Philippe Mathieu-Daudé posted 1 patch 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200530165512.15225-1-f4bug@amsat.org
include/migration/vmstate.h | 1 -
1 file changed, 1 deletion(-)
[PATCH] migration/vmstate: Remove unnecessary MemoryRegion forward declaration
Posted by Philippe Mathieu-Daudé 3 years, 11 months ago
"migration/vmstate.h" only uses pointer to MemoryRegion, which
is already forward declared in "qemu/typedefs.h".

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
CI: https://travis-ci.org/github/philmd/qemu/builds/692879495
---
 include/migration/vmstate.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 30667631bc..eafa39f560 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -1199,7 +1199,6 @@ static inline int vmstate_register(VMStateIf *obj, int instance_id,
 void vmstate_unregister(VMStateIf *obj, const VMStateDescription *vmsd,
                         void *opaque);
 
-struct MemoryRegion;
 void vmstate_register_ram(struct MemoryRegion *memory, DeviceState *dev);
 void vmstate_unregister_ram(struct MemoryRegion *memory, DeviceState *dev);
 void vmstate_register_ram_global(struct MemoryRegion *memory);
-- 
2.21.3


Re: [PATCH] migration/vmstate: Remove unnecessary MemoryRegion forward declaration
Posted by Dr. David Alan Gilbert 3 years, 11 months ago
* Philippe Mathieu-Daudé (f4bug@amsat.org) wrote:
> "migration/vmstate.h" only uses pointer to MemoryRegion, which
> is already forward declared in "qemu/typedefs.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> CI: https://travis-ci.org/github/philmd/qemu/builds/692879495
> ---
>  include/migration/vmstate.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index 30667631bc..eafa39f560 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -1199,7 +1199,6 @@ static inline int vmstate_register(VMStateIf *obj, int instance_id,
>  void vmstate_unregister(VMStateIf *obj, const VMStateDescription *vmsd,
>                          void *opaque);
>  
> -struct MemoryRegion;
>  void vmstate_register_ram(struct MemoryRegion *memory, DeviceState *dev);
>  void vmstate_unregister_ram(struct MemoryRegion *memory, DeviceState *dev);
>  void vmstate_register_ram_global(struct MemoryRegion *memory);

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

and queued.

> -- 
> 2.21.3
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK