From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4923296399931564633==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings Date: Fri, 05 Feb 2021 23:02:41 +0800 Message-ID: <20210205150241.GA14630@fda9b87e398a> In-Reply-To: <202102052231.1PclvF2N-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============4923296399931564633== 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: <20210205080621.3102035-7-john.stultz@linaro.org> References: <20210205080621.3102035-7-john.stultz@linaro.org> TO: John Stultz From: kernel test robot drivers/dma-buf/heaps/system_heap.c:299:5-8: Unneeded variable: "ret". Retu= rn "0" on line 308 Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci CC: John Stultz Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/John-Stultz/Generic-page-p= ool-deferred-freeing-for-system-dmabuf-heap/20210205-160846 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = 2ab38c17aac10bf55ab3efde4c4db3893d8691d2 :::::: branch date: 7 hours ago :::::: commit date: 7 hours ago Please take the patch only if it's a positive warning. Thanks! system_heap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/dma-buf/heaps/system_heap.c +++ b/drivers/dma-buf/heaps/system_heap.c @@ -296,7 +296,6 @@ static int system_heap_zero_buffer(struc struct sg_page_iter piter; struct page *p; void *vaddr; - int ret =3D 0; = for_each_sgtable_page(sgt, &piter, 0) { p =3D sg_page_iter_page(&piter); @@ -305,7 +304,7 @@ static int system_heap_zero_buffer(struc kunmap_atomic(vaddr); } = - return ret; + return 0; } = static void system_heap_dma_buf_release(struct dma_buf *dmabuf) --===============4923296399931564633==--