qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	"Maciej S . Szmigiero" <maciej.szmigiero@oracle.com>,
	Jon Doron <arilou@gmail.com>, Roman Kagan <rkagan@virtuozzo.com>
Subject: [PATCH 2/2] hw/hyperv/vmbus: Make vmstate_vmbus_dev static
Date: Thu,  3 Jun 2021 12:41:39 +0200	[thread overview]
Message-ID: <20210603104139.556512-3-thuth@redhat.com> (raw)
In-Reply-To: <20210603104139.556512-1-thuth@redhat.com>

vmstate_vmbus_dev is only used in vmbus.c, no need to export this
via the vmbus.h header file.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/hyperv/vmbus.c         | 28 ++++++++++++++--------------
 include/hw/hyperv/vmbus.h |  3 ---
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
index 2384103cb0..f05e419682 100644
--- a/hw/hyperv/vmbus.c
+++ b/hw/hyperv/vmbus.c
@@ -2438,6 +2438,20 @@ static void vmbus_dev_unrealize(DeviceState *dev)
     free_channels(vdev);
 }
 
+static const VMStateDescription vmstate_vmbus_dev = {
+    .name = TYPE_VMBUS_DEVICE,
+    .version_id = 0,
+    .minimum_version_id = 0,
+    .fields = (VMStateField[]) {
+        VMSTATE_UINT8_ARRAY(instanceid.data, VMBusDevice, 16),
+        VMSTATE_UINT16(num_channels, VMBusDevice),
+        VMSTATE_STRUCT_VARRAY_POINTER_UINT16(channels, VMBusDevice,
+                                             num_channels, vmstate_channel,
+                                             VMBusChannel),
+        VMSTATE_END_OF_LIST()
+    }
+};
+
 static void vmbus_dev_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *kdev = DEVICE_CLASS(klass);
@@ -2464,20 +2478,6 @@ static void vmbus_dev_instance_init(Object *obj)
     }
 }
 
-const VMStateDescription vmstate_vmbus_dev = {
-    .name = TYPE_VMBUS_DEVICE,
-    .version_id = 0,
-    .minimum_version_id = 0,
-    .fields = (VMStateField[]) {
-        VMSTATE_UINT8_ARRAY(instanceid.data, VMBusDevice, 16),
-        VMSTATE_UINT16(num_channels, VMBusDevice),
-        VMSTATE_STRUCT_VARRAY_POINTER_UINT16(channels, VMBusDevice,
-                                             num_channels, vmstate_channel,
-                                             VMBusChannel),
-        VMSTATE_END_OF_LIST()
-    }
-};
-
 /* vmbus generic device base */
 static const TypeInfo vmbus_dev_type_info = {
     .name = TYPE_VMBUS_DEVICE,
diff --git a/include/hw/hyperv/vmbus.h b/include/hw/hyperv/vmbus.h
index f98bea3888..7fab984e62 100644
--- a/include/hw/hyperv/vmbus.h
+++ b/include/hw/hyperv/vmbus.h
@@ -13,7 +13,6 @@
 #include "sysemu/sysemu.h"
 #include "sysemu/dma.h"
 #include "hw/qdev-core.h"
-#include "migration/vmstate.h"
 #include "hw/hyperv/vmbus-proto.h"
 #include "qemu/uuid.h"
 #include "qom/object.h"
@@ -85,8 +84,6 @@ struct VMBusDevice {
     AddressSpace *dma_as;
 };
 
-extern const VMStateDescription vmstate_vmbus_dev;
-
 /*
  * A unit of work parsed out of a message in the receive (i.e. guest->host)
  * ring buffer of a channel.  It's supposed to be subclassed (through
-- 
2.27.0



  parent reply	other threads:[~2021-06-03 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 10:41 [PATCH 0/2] Improve vmstate_vmbus_dev handling Thomas Huth
2021-06-03 10:41 ` [PATCH 1/2] hw/hyperv/vmbus: Wire up vmstate_vmbus_dev Thomas Huth
2021-06-03 10:41 ` Thomas Huth [this message]
2021-06-05 16:01 ` [PATCH 0/2] Improve vmstate_vmbus_dev handling Maciej S. Szmigiero
2021-06-07  7:16   ` Thomas Huth

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=20210603104139.556512-3-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=arilou@gmail.com \
    --cc=maciej.szmigiero@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rkagan@virtuozzo.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).