diff mbox series

[3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro

Message ID 20231017140150.44995-4-philmd@linaro.org
State Superseded
Headers show
Series hw: Few more QOM/QDev cleanups | expand

Commit Message

Philippe Mathieu-Daudé Oct. 17, 2023, 2:01 p.m. UTC
Access QOM parent with the proper QOM VIRTIO_DEVICE() macro.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/display/virtio-gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Manos Pitsidianakis Oct. 17, 2023, 5:19 p.m. UTC | #1
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>Access QOM parent with the proper QOM VIRTIO_DEVICE() macro.
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>---
> hw/display/virtio-gpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
>index 93857ad523..51cb517999 100644
>--- a/hw/display/virtio-gpu.c
>+++ b/hw/display/virtio-gpu.c
>@@ -1132,7 +1132,7 @@ static void virtio_gpu_ctrl_bh(void *opaque)
>     VirtIOGPU *g = opaque;
>     VirtIOGPUClass *vgc = VIRTIO_GPU_GET_CLASS(g);
> 
>-    vgc->handle_ctrl(&g->parent_obj.parent_obj, g->ctrl_vq);
>+    vgc->handle_ctrl(VIRTIO_DEVICE(g), g->ctrl_vq);
> }
> 
> static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)
>-- 
>2.41.0
>
>

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Mark Cave-Ayland Oct. 17, 2023, 8:10 p.m. UTC | #2
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote:

> Access QOM parent with the proper QOM VIRTIO_DEVICE() macro.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/display/virtio-gpu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index 93857ad523..51cb517999 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1132,7 +1132,7 @@ static void virtio_gpu_ctrl_bh(void *opaque)
>       VirtIOGPU *g = opaque;
>       VirtIOGPUClass *vgc = VIRTIO_GPU_GET_CLASS(g);
>   
> -    vgc->handle_ctrl(&g->parent_obj.parent_obj, g->ctrl_vq);
> +    vgc->handle_ctrl(VIRTIO_DEVICE(g), g->ctrl_vq);
>   }
>   
>   static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>


ATB,

Mark.
diff mbox series

Patch

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 93857ad523..51cb517999 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1132,7 +1132,7 @@  static void virtio_gpu_ctrl_bh(void *opaque)
     VirtIOGPU *g = opaque;
     VirtIOGPUClass *vgc = VIRTIO_GPU_GET_CLASS(g);
 
-    vgc->handle_ctrl(&g->parent_obj.parent_obj, g->ctrl_vq);
+    vgc->handle_ctrl(VIRTIO_DEVICE(g), g->ctrl_vq);
 }
 
 static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)