From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============7062767589916551515==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] dma-buf: heaps: fix returnvar.cocci warnings Date: Sat, 26 Sep 2020 18:11:37 +0800 Message-ID: <20200926101137.GA37521@3c6a3e009ba2> In-Reply-To: <202009261808.FRWudK9W%lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============7062767589916551515== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 From: kernel test robot 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 Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/John-Stultz/dma-buf-Perfor= mance-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 =3D dmabuf->priv; struct dma_heap_attachment *a; - int ret =3D 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, --===============7062767589916551515==--