[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header |
Date: |
Wed, 19 Aug 2020 20:12:07 -0400 |
Move the VHOST_USER_GPU type checking macro to virtio-gpu.h,
close to the TYPE_VHOST_USER_GPU #define.
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: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
---
include/hw/virtio/virtio-gpu.h | 2 ++
hw/display/vhost-user-gpu.c | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 6dd57f2025..7517438e10 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -36,6 +36,8 @@
OBJECT_CHECK(VirtIOGPU, (obj), TYPE_VIRTIO_GPU)
#define TYPE_VHOST_USER_GPU "vhost-user-gpu"
+#define VHOST_USER_GPU(obj) \
+ OBJECT_CHECK(VhostUserGPU, (obj), TYPE_VHOST_USER_GPU)
#define VIRTIO_ID_GPU 16
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 4cdaee1bde..51f1747c4a 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -17,9 +17,6 @@
#include "qapi/error.h"
#include "migration/blocker.h"
-#define VHOST_USER_GPU(obj) \
- OBJECT_CHECK(VhostUserGPU, (obj), TYPE_VHOST_USER_GPU)
-
typedef enum VhostUserGpuRequest {
VHOST_USER_GPU_NONE = 0,
VHOST_USER_GPU_GET_PROTOCOL_FEATURES,
--
2.26.2
- Re: [PATCH v2 25/58] armsse: Rename QOM macros to avoid conflicts, (continued)
- [PATCH v2 24/58] platform-bus: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/19
- [PATCH v2 26/58] xen-legacy-backend: Add missing typedef XenLegacyDevice, Eduardo Habkost, 2020/08/19
- [PATCH v2 27/58] spapr: Move typedef SpaprMachineState to spapr.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 28/58] s390x: Move typedef SCLPEventFacility to event-facility.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header,
Eduardo Habkost <=
- [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