Skip to contentSkip to conversation

migration/vmstate: Remove unnecessary MemoryRegion forward declaration

PATCH In review Philippe Mathieu-Daudé 2 participants 2 messages May 30, 2020 – Jun 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 migration/vmstate: Remove unnecessary MemoryRegion forward declaration

"migration/vmstate.h" only uses pointer to MemoryRegion, which is already forward declared in "qemu/typedefs.h".

---
CI: https://travis-ci.org/github/philmd/qemu/builds/692879495

---
 include/migration/vmstate.h | 1 -
 1 file changed, 1 deletion(-)
include/migration/vmstate.h +0 -1
index 30667631bc..eafa39f560 100644
@@ -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);
Signature · 1 line
2.21.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:

"migration/vmstate.h" only uses pointer to MemoryRegion, which is already forward declared in "qemu/typedefs.h".

---
CI: https://travis-ci.org/github/philmd/qemu/builds/692879495

---
 include/migration/vmstate.h | 1 -
 1 file changed, 1 deletion(-)
include/migration/vmstate.h +0 -0
index 30667631bc..eafa39f560 100644

include/migration/vmstate.h static inline int vmstate_register(VMStateIf *obj, int instance_id, · line 1204

Quoted 7 lines
include/migration/vmstate.h +0 -1
@@ -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);

and queued.

Quoted 3 lines
Signature · 1 line
2.21.3

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK