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 <th...@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