drm/virtio: Remove redundant return type
Subsystems (4)
PATCH v2 1/1 drm/virtio: Remove redundant return type
virtio_gpu_fence_emit() always returns 0, since it has no error paths.
Consequently no calls for virtio_gpu_fence_emit() use the return value, and it can be removed.
---
This patch was suggested in this email thread:
[PATCH] drm/virtio: allocate fences with GFP_KERNEL
https://www.spinics.net/lists/dri-devel/msg208536.html
Changes since v1:
- Rebased on drm-misc-next
- Added r-b from Chia-I Wu
drivers/gpu/drm/virtio/virtgpu_drv.h | 2 +- drivers/gpu/drm/virtio/virtgpu_fence.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/virtio/virtgpu_drv.h +1 -1
@@ -355,7 +355,7 @@ int virtio_gpu_mmap(struct file *filp, struct vm_area_struct *vma);bool virtio_fence_signaled (struct dma_fence *f);struct virtio_gpu_fence *virtio_gpu_fence_alloc (struct virtio_gpu_device *vgdev); -int virtio_gpu_fence_emit (struct virtio_gpu_device *vgdev, +void virtio_gpu_fence_emit (struct virtio_gpu_device *vgdev,struct virtio_gpu_ctrl_hdr *cmd_hdr,struct virtio_gpu_fence *fence); void virtio_gpu_fence_event_process(struct virtio_gpu_device *vdev,
drivers/gpu/drm/virtio/virtgpu_fence.c +1 -2
@@ -85,7 +85,7 @@ struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev)return fence; } -int virtio_gpu_fence_emit (struct virtio_gpu_device *vgdev, +void virtio_gpu_fence_emit (struct virtio_gpu_device *vgdev,struct virtio_gpu_ctrl_hdr *cmd_hdr,struct virtio_gpu_fence *fence) {
@@ -102,7 +102,6 @@ int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, cmd_hdr->flags |=cpu_to_le32 (VIRTIO_GPU_FLAG_FENCE ); cmd_hdr->fence_id =cpu_to_le64 (fence->f.seqno); -return 0 ; } void virtio_gpu_fence_event_process(struct virtio_gpu_device *vgdev,
Signature · 1 line
2.20.1
Quoted 9 lines · Robert Foss
virtio_gpu_fence_emit()always returns 0, since it has no error paths.Consequently no calls for
virtio_gpu_fence_emit()use the return value, and it can be removed.Signed-off-by Robert Foss <[email protected]>Suggested-by Emil Velikov <[email protected]>Reviewed-by Chia-I Wu <[email protected]>
Pushed to drm-misc-next.
thanks,
Gerd
Quoted 9 lines · Robert Foss
virtio_gpu_fence_emit()always returns 0, since it has no error paths.Consequently no calls for
virtio_gpu_fence_emit()use the return value, and it can be removed.Signed-off-by Robert Foss <[email protected]>Suggested-by Emil Velikov <[email protected]>Reviewed-by Chia-I Wu <[email protected]>
Pushed to drm-misc-next.
thanks,
Gerd