[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200506091319.yng6bgrnt3zrhb5s@DESKTOP-E1NTVVP.localdomain>
Date: Wed, 6 May 2020 10:13:19 +0100
From: Brian Starkey <brian.starkey@....com>
To: Jason Yan <yanaijie@...wei.com>
Cc: sumit.semwal@...aro.org, afd@...com, benjamin.gaignard@...aro.org,
lmark@...eaurora.org, labbott@...hat.com, john.stultz@...aro.org,
seanpaul@...omium.org, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
linux-kernel@...r.kernel.org, nd@....com
Subject: Re: [PATCH] dma-buf: heaps: Remove Unneeded variable "ret" in
dma_heap_dma_buf_begin_cpu_access()
Hi Jason,
On Wed, May 06, 2020 at 02:18:51PM +0800, Jason Yan wrote:
> Fix the following coccicheck warning:
>
> drivers/dma-buf/heaps/heap-helpers.c:203:5-8: Unneeded variable: "ret".
> Return "0" on line 216
>
> Signed-off-by: Jason Yan <yanaijie@...wei.com>
LGTM.
Reviewed-by: Brian Starkey <brian.starkey@....com>
Thanks,
-Brian
> ---
> drivers/dma-buf/heaps/heap-helpers.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c
> index 9f964ca3f59c..c82872501ba2 100644
> --- a/drivers/dma-buf/heaps/heap-helpers.c
> +++ b/drivers/dma-buf/heaps/heap-helpers.c
> @@ -200,7 +200,6 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
> {
> struct heap_helper_buffer *buffer = dmabuf->priv;
> struct dma_heaps_attachment *a;
> - int ret = 0;
>
> mutex_lock(&buffer->lock);
>
> @@ -213,7 +212,7 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
> }
> mutex_unlock(&buffer->lock);
>
> - return ret;
> + return 0;
> }
>
> static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,
> --
> 2.21.1
>
Powered by blists - more mailing lists