All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings
  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
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-22 18:04 UTC (permalink / raw)
  To: John Stultz; +Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel

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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [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
@ 2022-02-22 18:14 kernel test robot
  2022-02-22 18:04 ` [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings kernel test robot
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-02-22 18:14 UTC (permalink / raw)
  To: John Stultz; +Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel

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
config: x86_64-randconfig-c022-20220221 (https://download.01.org/0day-ci/archive/20220223/202202230232.gcmck8F2-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> drivers/dma-buf/heaps/system_heap.c:312:5-8: Unneeded variable: "ret". Return "0" on line 321

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings
  2021-03-31 21:37 [android-common:android12-5.4 4/9] drivers/dma-buf/heaps/system_heap.c:312:5-8: Unneeded variable: "ret". Return "0" on line 321 kernel test robot
@ 2021-03-31 21:37 ` kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-03-31 21:37 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]

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

Fixes: 44008f99d9ca ("ANDROID: dma-buf: system_heap: Add pagepool support to system heap")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://android.googlesource.com/kernel/common android12-5.4
head:   82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4/9] ANDROID: dma-buf: system_heap: Add pagepool support to system heap

 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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-22 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-03-31 21:37 [android-common:android12-5.4 4/9] drivers/dma-buf/heaps/system_heap.c:312:5-8: Unneeded variable: "ret". Return "0" on line 321 kernel test robot
2021-03-31 21:37 ` [PATCH] ANDROID: dma-buf: system_heap: fix returnvar.cocci warnings kernel test robot

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.