All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: John Stultz <john.stultz@linaro.org>
Cc: kbuild-all@lists.01.org,
	GNU/Weeb Mailing List <gwml@vger.gnuweeb.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings
Date: Wed, 23 Feb 2022 02:04:46 +0800	[thread overview]
Message-ID: <20220222180445.GA19085@31c17c0ba754> (raw)
In-Reply-To: <202202230232.gcmck8F2-lkp@intel.com>

From: kernel test robot <lkp@intel.com>

drivers/dma-buf/heaps/system_heap.c:312:5-8: Unneeded variable: "ret". Return "0" on line 321


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-5.4
head:   0d36c5d6308623c56e2e94aff13e820cdd676bbf
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4032/9999] ANDROID: dma-buf: system_heap: Add pagepool support to system heap
:::::: branch date: 6 hours ago
:::::: commit date: 1 year ago

 drivers/dma-buf/heaps/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
@@ -309,7 +309,6 @@ static int system_heap_zero_buffer(struc
 	struct sg_page_iter piter;
 	struct page *p;
 	void *vaddr;
-	int ret = 0;
 
 	for_each_sgtable_page(sgt, &piter, 0) {
 		p = sg_page_iter_page(&piter);
@@ -318,7 +317,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)

  reply	other threads:[~2022-02-22 18:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 18:14 [ammarfaizi2-block:google/android/kernel/common/android12-5.4 4032/9999] drivers/dma-buf/heaps/system_heap.c:312:5-8: Unneeded variable: "ret". Return "0" on line 321 kernel test robot
2022-02-22 18:04 ` kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-31 21:37 [android-common:android12-5.4 4/9] " kernel test robot
2021-03-31 21:37 ` [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings kernel test robot

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=20220222180445.GA19085@31c17c0ba754 \
    --to=lkp@intel.com \
    --cc=gwml@vger.gnuweeb.org \
    --cc=john.stultz@linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.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.