From 2504f868f3e69ce923bf9997ca1051ab053859fa Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Tue, 25 Aug 2020 15:20:25 -0400 Subject: [PATCH] vhost-user-gpu: Move QOM macro to header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost Tested-By: Roman Bolshakov Message-Id: <20200825192110.3528606-30-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- hw/display/vhost-user-gpu.c | 3 --- include/hw/virtio/virtio-gpu.h | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) 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, 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