From c76d4ab764adaef6ee4c385df2df24dbaea88412 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Wed, 1 Apr 2020 15:30:38 -0700 Subject: drm/virtio: make virtio_gpu_object_attach void It always returns zero. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200401223039.2860-4-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 8 ++++---- drivers/gpu/drm/virtio/virtgpu_object.c | 6 +----- drivers/gpu/drm/virtio/virtgpu_vq.c | 9 ++++----- 3 files changed, 9 insertions(+), 14 deletions(-) (limited to 'drivers/gpu/drm/virtio') diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 79ad176aca5a..49bebdee6d91 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -279,10 +279,10 @@ void virtio_gpu_cmd_set_scanout(struct virtio_gpu_device *vgdev, uint32_t scanout_id, uint32_t resource_id, uint32_t width, uint32_t height, uint32_t x, uint32_t y); -int virtio_gpu_object_attach(struct virtio_gpu_device *vgdev, - struct virtio_gpu_object *obj, - struct virtio_gpu_mem_entry *ents, - unsigned int nents); +void virtio_gpu_object_attach(struct virtio_gpu_device *vgdev, + struct virtio_gpu_object *obj, + struct virtio_gpu_mem_entry *ents, + unsigned int nents); int virtio_gpu_attach_status_page(struct virtio_gpu_device *vgdev); int virtio_gpu_detach_status_page(struct virtio_gpu_device *vgdev); void virtio_gpu_cursor_ping(struct virtio_gpu_device *vgdev, diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 51a8da7d5ef3..6ccbd01cd888 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -235,11 +235,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, return ret; } - ret = virtio_gpu_object_attach(vgdev, bo, ents, nents); - if (ret != 0) { - virtio_gpu_free_object(&shmem_obj->base); - return ret; - } + virtio_gpu_object_attach(vgdev, bo, ents, nents); *bo_ptr = bo; return 0; diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 73854915ec34..9e663a5d9952 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -1087,14 +1087,13 @@ void virtio_gpu_cmd_submit(struct virtio_gpu_device *vgdev, virtio_gpu_queue_fenced_ctrl_buffer(vgdev, vbuf, fence); } -int virtio_gpu_object_attach(struct virtio_gpu_device *vgdev, - struct virtio_gpu_object *obj, - struct virtio_gpu_mem_entry *ents, - unsigned int nents) +void virtio_gpu_object_attach(struct virtio_gpu_device *vgdev, + struct virtio_gpu_object *obj, + struct virtio_gpu_mem_entry *ents, + unsigned int nents) { virtio_gpu_cmd_resource_attach_backing(vgdev, obj->hw_res_handle, ents, nents, NULL); - return 0; } void virtio_gpu_cursor_ping(struct virtio_gpu_device *vgdev, -- cgit v1.2.3