From: Jason Yan <yanaijie@huawei.com>
To: <sumit.semwal@linaro.org>, <afd@ti.com>,
<benjamin.gaignard@linaro.org>, <lmark@codeaurora.org>,
<labbott@redhat.com>, <Brian.Starkey@arm.com>,
<john.stultz@linaro.org>, <seanpaul@chromium.org>,
<linux-media@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
<linaro-mm-sig@lists.linaro.org>, <linux-kernel@vger.kernel.org>
Cc: Jason Yan <yanaijie@huawei.com>
Subject: [PATCH] dma-buf: heaps: Remove Unneeded variable "ret" in dma_heap_dma_buf_begin_cpu_access()
Date: Wed, 6 May 2020 14:18:51 +0800 [thread overview]
Message-ID: <20200506061851.19745-1-yanaijie@huawei.com> (raw)
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>
---
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
next reply other threads:[~2020-05-06 7:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 6:18 Jason Yan [this message]
2020-05-06 9:13 ` [PATCH] dma-buf: heaps: Remove Unneeded variable "ret" in dma_heap_dma_buf_begin_cpu_access() Brian Starkey
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=20200506061851.19745-1-yanaijie@huawei.com \
--to=yanaijie@huawei.com \
--cc=Brian.Starkey@arm.com \
--cc=afd@ti.com \
--cc=benjamin.gaignard@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=john.stultz@linaro.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=seanpaul@chromium.org \
--cc=sumit.semwal@linaro.org \
/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).