From: Brian Starkey <brian.starkey@arm.com>
To: Jason Yan <yanaijie@huawei.com>
Cc: nd@arm.com, linux-kernel@vger.kernel.org, lmark@codeaurora.org,
afd@ti.com, linaro-mm-sig@lists.linaro.org,
dri-devel@lists.freedesktop.org, seanpaul@chromium.org,
labbott@redhat.com, linux-media@vger.kernel.org
Subject: Re: [PATCH] dma-buf: heaps: Remove Unneeded variable "ret" in dma_heap_dma_buf_begin_cpu_access()
Date: Wed, 6 May 2020 10:13:19 +0100 [thread overview]
Message-ID: <20200506091319.yng6bgrnt3zrhb5s@DESKTOP-E1NTVVP.localdomain> (raw)
In-Reply-To: <20200506061851.19745-1-yanaijie@huawei.com>
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@huawei.com>
LGTM.
Reviewed-by: Brian Starkey <brian.starkey@arm.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
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2020-05-06 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 6:18 [PATCH] dma-buf: heaps: Remove Unneeded variable "ret" in dma_heap_dma_buf_begin_cpu_access() Jason Yan
2020-05-06 9:13 ` Brian Starkey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200506091319.yng6bgrnt3zrhb5s@DESKTOP-E1NTVVP.localdomain \
--to=brian.starkey@arm.com \
--cc=afd@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=labbott@redhat.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lmark@codeaurora.org \
--cc=nd@arm.com \
--cc=seanpaul@chromium.org \
--cc=yanaijie@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).