Let's define a proper type, just as we do for PrecopyNotifyData already.
Cc: Wei Wang <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: Philippe Mathieu-Daudé <[email protected]>
Cc: Alexander Duyck <[email protected]>
Cc: Juan Quintela <[email protected]>
Cc: "Dr. David Alan Gilbert" <[email protected]>
Cc: Peter Xu <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
---
hw/virtio/vhost-user.c | 2 +-
migration/postcopy-ram.c | 2 +-
migration/postcopy-ram.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 1ac4a2ebec..42dad711bf 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -1827,9 +1827,9 @@ static int vhost_user_postcopy_end(struct vhost_dev *dev,
Error **errp)
static int vhost_user_postcopy_notifier(NotifierWithReturn *notifier,
void *opaque)
{
- struct PostcopyNotifyData *pnd = opaque;
struct vhost_user *u = container_of(notifier, struct vhost_user,
postcopy_notifier);
+ PostcopyNotifyData *pnd = opaque;
struct vhost_dev *dev = u->dev;
switch (pnd->reason) {
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index 2e9697bdd2..ee4e1c7cf5 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -69,7 +69,7 @@ void postcopy_remove_notifier(NotifierWithReturn *n)
int postcopy_notify(enum PostcopyNotifyReason reason, Error **errp)
{
- struct PostcopyNotifyData pnd;
+ PostcopyNotifyData pnd;
pnd.reason = reason;
pnd.errp = errp;
diff --git a/migration/postcopy-ram.h b/migration/postcopy-ram.h
index 6d2b3cf124..01829c3562 100644
--- a/migration/postcopy-ram.h
+++ b/migration/postcopy-ram.h
@@ -125,10 +125,10 @@ enum PostcopyNotifyReason {
POSTCOPY_NOTIFY_INBOUND_END,
};
-struct PostcopyNotifyData {
+typedef struct PostcopyNotifyData {
enum PostcopyNotifyReason reason;
Error **errp;
-};
+} PostcopyNotifyData;
void postcopy_add_notifier(NotifierWithReturn *nn);
void postcopy_remove_notifier(NotifierWithReturn *n);
--
2.31.1