From: kernel test robot <[email protected]>
To: John Stultz <[email protected]>
Cc: [email protected],
GNU/Weeb Mailing List <[email protected]>,
[email protected]
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: <[email protected]>
From: kernel test robot <[email protected]>
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 <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---
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)
prev parent reply other threads:[~2022-02-22 18:05 UTC|newest]
Thread overview: 2+ 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]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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