From: David Hildenbrand <david@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Juan Quintela" <quintela@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Alexander Duyck" <alexander.duyck@gmail.com>,
"Wei Wang" <wei.w.wang@intel.com>, "Peter Xu" <peterx@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PATCH v1 1/2] migration/postcopy-ram: define type for "struct PostcopyNotifyData"
Date: Wed, 7 Jul 2021 16:06:54 +0200 [thread overview]
Message-ID: <20210707140655.30982-2-david@redhat.com> (raw)
In-Reply-To: <20210707140655.30982-1-david@redhat.com>
Let's define a proper type, just as we do for PrecopyNotifyData already.
Cc: Wei Wang <wei.w.wang@intel.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: David Hildenbrand <david@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
next prev parent reply other threads:[~2021-07-07 14:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 14:06 [PATCH v1 0/2] virtio-balloon: disallow postcopy with VIRTIO_BALLOON_F_FREE_PAGE_HINT David Hildenbrand
2021-07-07 14:06 ` David Hildenbrand [this message]
2021-07-07 20:30 ` [PATCH v1 1/2] migration/postcopy-ram: define type for "struct PostcopyNotifyData" Pankaj Gupta
2021-07-07 14:06 ` [PATCH v1 2/2] virtio-balloon: disallow postcopy with VIRTIO_BALLOON_F_FREE_PAGE_HINT David Hildenbrand
2021-07-07 18:02 ` Peter Xu
2021-07-07 18:57 ` David Hildenbrand
2021-07-07 19:07 ` Michael S. Tsirkin
2021-07-07 20:08 ` Peter Xu
2021-07-07 21:22 ` Alexander Duyck
2021-07-07 22:40 ` Peter Xu
2021-07-08 7:14 ` David Hildenbrand
2021-07-08 7:23 ` David Hildenbrand
2021-07-07 19:05 ` Michael S. Tsirkin
2021-07-07 19:14 ` David Hildenbrand
2021-07-07 19:19 ` Michael S. Tsirkin
2021-07-07 19:47 ` David Hildenbrand
2021-07-07 19:57 ` Michael S. Tsirkin
2021-07-08 8:19 ` David Hildenbrand
2021-07-08 19:07 ` Dr. David Alan Gilbert
2021-07-09 11:27 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210707140655.30982-2-david@redhat.com \
--to=david@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=dgilbert@redhat.com \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=wei.w.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).