lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPaKu7SfkUN4FBQ5Xm3zfdvvbcvBAWDz0k2FVdn8TNZWwiV-tg@mail.gmail.com>
Date:   Fri, 3 May 2019 09:40:58 -0700
From:   Chia-I Wu <olvaffe@...il.com>
To:     Robert Foss <robert.foss@...labora.com>
Cc:     David Airlie <airlied@...ux.ie>, Gerd Hoffmann <kraxel@...hat.com>,
        Daniel Vetter <daniel@...ll.ch>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>,
        "open list:VIRTIO CORE, NET AND BLOCK DRIVERS" 
        <virtualization@...ts.linux-foundation.org>,
        open list <linux-kernel@...r.kernel.org>,
        Emil Velikov <emil.velikov@...labora.com>
Subject: Re: [PATCH] drm/virtio: Remove redundant return type

On Fri, May 3, 2019 at 9:38 AM Robert Foss <robert.foss@...labora.com> wrote:
>
> 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 <robert.foss@...labora.com>
> Suggested-by: Emil Velikov <emil.velikov@...labora.com>
Reviewed-by: Chia-I Wu <olvaffe@...il.com>
> ---
>
> 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
>
>  drivers/gpu/drm/virtio/virtgpu_drv.h   | 2 +-
>  drivers/gpu/drm/virtio/virtgpu_fence.c | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
> index d577cb76f5ad..9bc56887fbdb 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_drv.h
> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
> @@ -334,7 +334,7 @@ int virtio_gpu_mmap(struct file *filp, struct vm_area_struct *vma);
>  /* virtio_gpu_fence.c */
>  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,
> diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c
> index 21bd4c4a32d1..e0744ac768cc 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_fence.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c
> @@ -81,7 +81,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)
>  {
> @@ -96,7 +96,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->seq);
> -       return 0;
>  }
>
>  void virtio_gpu_fence_event_process(struct virtio_gpu_device *vgdev,
> --
> 2.20.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ