qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] virtio-gpu: remove unused config_size


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 2/4] virtio-gpu: remove unused config_size
Date: Thu, 21 Feb 2019 18:37:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 2/21/19 12:43 PM, Marc-André Lureau wrote:
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  include/hw/virtio/virtio-gpu.h | 2 --
>  hw/display/virtio-gpu.c        | 3 +--
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
> index c7cb821ae3..a1cecd1df8 100644
> --- a/include/hw/virtio/virtio-gpu.h
> +++ b/include/hw/virtio/virtio-gpu.h
> @@ -96,8 +96,6 @@ typedef struct VirtIOGPU {
>  
>      int enable;
>  
> -    int config_size;
> -
>      QTAILQ_HEAD(, virtio_gpu_simple_resource) reslist;
>      QTAILQ_HEAD(, virtio_gpu_ctrl_command) cmdq;
>      QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq;
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index a52c2aed0e..8f4351420b 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1238,10 +1238,9 @@ static void virtio_gpu_device_realize(DeviceState 
> *qdev, Error **errp)
>          }
>      }
>  
> -    g->config_size = sizeof(struct virtio_gpu_config);
>      g->virtio_config.num_scanouts = cpu_to_le32(g->conf.max_outputs);
>      virtio_init(VIRTIO_DEVICE(g), "virtio-gpu", VIRTIO_ID_GPU,
> -                g->config_size);

Well, it is "used" but we can simplify.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

> +                sizeof(struct virtio_gpu_config));
>  
>      g->req_state[0].width = g->conf.xres;
>      g->req_state[0].height = g->conf.yres;
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]