Let's define a proper type, just as we do for PrecopyNotifyData already. Cc: Wei Wang <wei.w.w...@intel.com> Cc: Michael S. Tsirkin <m...@redhat.com> Cc: Philippe Mathieu-Daudé <phi...@redhat.com> Cc: Alexander Duyck <alexander.du...@gmail.com> Cc: Juan Quintela <quint...@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilb...@redhat.com> Cc: Peter Xu <pet...@redhat.com> Signed-off-by: David Hildenbrand <da...@redhat.com> --- 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