From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] dma-buf: heaps: fix returnvar.cocci warnings
Date: Sat, 26 Sep 2020 18:11:37 +0800 [thread overview]
Message-ID: <20200926101137.GA37521@3c6a3e009ba2> (raw)
In-Reply-To: <202009261808.FRWudK9W%lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1543 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200926042453.67517-3-john.stultz@linaro.org>
References: <20200926042453.67517-3-john.stultz@linaro.org>
TO: John Stultz <john.stultz@linaro.org>
From: kernel test robot <lkp@intel.com>
drivers/dma-buf/heaps/cma_heap.c:119:5-8: Unneeded variable: "ret". Return "0" on line 131
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
CC: John Stultz <john.stultz@linaro.org>
Signed-off-by: kernel test robot <lkp@intel.com>
---
url: https://github.com/0day-ci/linux/commits/John-Stultz/dma-buf-Performance-improvements-for-system-heap/20200926-122541
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
Please take the patch only if it's a positive warning. Thanks!
cma_heap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/dma-buf/heaps/cma_heap.c
+++ b/drivers/dma-buf/heaps/cma_heap.c
@@ -116,7 +116,6 @@ static int cma_heap_dma_buf_begin_cpu_ac
{
struct cma_heap_buffer *buffer = dmabuf->priv;
struct dma_heap_attachment *a;
- int ret = 0;
if (buffer->vmap_cnt)
invalidate_kernel_vmap_range(buffer->vaddr, buffer->len);
@@ -128,7 +127,7 @@ static int cma_heap_dma_buf_begin_cpu_ac
}
mutex_unlock(&buffer->lock);
- return ret;
+ return 0;
}
static int cma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,
next prev parent reply other threads:[~2020-09-26 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 10:11 [RFC][PATCH 2/6] dma-buf: heaps: Move heap-helper logic into the cma_heap implementation kernel test robot
2020-09-26 10:11 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-09-26 13:47 [PATCH] dma-buf: heaps: fix returnvar.cocci warnings Julia Lawall
2020-09-29 20:19 ` John Stultz
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=20200926101137.GA37521@3c6a3e009ba2 \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.