[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h |
Date: |
Wed, 19 Aug 2020 20:12:12 -0400 |
Move all declarations related to TYPE_VMBUS to the same place in
vmbus.h.
This will make future conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2: new patch in series v2
Cc: qemu-devel@nongnu.org
---
include/hw/hyperv/vmbus-bridge.h | 3 +--
include/hw/hyperv/vmbus.h | 4 ++++
hw/hyperv/vmbus.c | 3 ---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/hw/hyperv/vmbus-bridge.h b/include/hw/hyperv/vmbus-bridge.h
index 33f93de64d..fe90bda01b 100644
--- a/include/hw/hyperv/vmbus-bridge.h
+++ b/include/hw/hyperv/vmbus-bridge.h
@@ -11,11 +11,10 @@
#define HW_HYPERV_VMBUS_BRIDGE_H
#include "hw/sysbus.h"
+#include "hw/hyperv/vmbus.h"
#define TYPE_VMBUS_BRIDGE "vmbus-bridge"
-typedef struct VMBus VMBus;
-
typedef struct VMBusBridge {
SysBusDevice parent_obj;
diff --git a/include/hw/hyperv/vmbus.h b/include/hw/hyperv/vmbus.h
index 40e8417eec..cd98ec24e7 100644
--- a/include/hw/hyperv/vmbus.h
+++ b/include/hw/hyperv/vmbus.h
@@ -26,6 +26,10 @@
#define VMBUS_DEVICE_GET_CLASS(obj) \
OBJECT_GET_CLASS(VMBusDeviceClass, (obj), TYPE_VMBUS_DEVICE)
+#define TYPE_VMBUS "vmbus"
+typedef struct VMBus VMBus;
+#define VMBUS(obj) OBJECT_CHECK(VMBus, (obj), TYPE_VMBUS)
+
/*
* Object wrapping a GPADL -- GPA Descriptor List -- an array of guest physical
* pages, to be used for various buffers shared between the host and the guest.
diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
index 34392e892a..75af6b83dd 100644
--- a/hw/hyperv/vmbus.c
+++ b/hw/hyperv/vmbus.c
@@ -20,9 +20,6 @@
#include "cpu.h"
#include "trace.h"
-#define TYPE_VMBUS "vmbus"
-#define VMBUS(obj) OBJECT_CHECK(VMBus, (obj), TYPE_VMBUS)
-
enum {
VMGPADL_INIT,
VMGPADL_ALIVE,
--
2.26.2
- Re: [PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header, (continued)
- [PATCH v2 30/58] ahci: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 31/58] i8257: Move QOM macro to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 32/58] ahci: Move QOM macro to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 33/58] pckbd: Move QOM macro to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h,
Eduardo Habkost <=
- [PATCH v2 35/58] virtio-serial-bus: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 36/58] piix: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 37/58] auxbus: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 38/58] rocker: Move QOM macros to header, Eduardo Habkost, 2020/08/19