All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings
@ 2020-09-26 13:53 Julia Lawall
  2020-09-29 20:29 ` John Stultz
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2020-09-26 13:53 UTC (permalink / raw)
  To: kbuild-all

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

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

Remove unneeded variable used to store return value.

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

CC: John Stultz <john.stultz@linaro.org>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

---

url:    https://github.com/0day-ci/linux/commits/John-Stultz/dma-buf-Performance-improvements-for-system-heap/20200926-122541
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
:::::: branch date: 4 hours ago
:::::: commit date: 4 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
@@ -133,7 +133,6 @@ static int system_heap_dma_buf_begin_cpu
 {
 	struct system_heap_buffer *buffer = dmabuf->priv;
 	struct dma_heap_attachment *a;
-	int ret = 0;

 	mutex_lock(&buffer->lock);

@@ -146,7 +145,7 @@ static int system_heap_dma_buf_begin_cpu
 	}
 	mutex_unlock(&buffer->lock);

-	return ret;
+	return 0;
 }

 static int system_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,

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

* Re: [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings
  2020-09-26 13:53 [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings Julia Lawall
@ 2020-09-29 20:29 ` John Stultz
  0 siblings, 0 replies; 4+ messages in thread
From: John Stultz @ 2020-09-29 20:29 UTC (permalink / raw)
  To: kbuild-all

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

On Sat, Sep 26, 2020 at 6:53 AM Julia Lawall <julia.lawall@inria.fr> wrote:
>
> From: kernel test robot <lkp@intel.com>
>
> Remove unneeded variable used to store return value.
>
> Generated by: scripts/coccinelle/misc/returnvar.cocci
>
> CC: John Stultz <john.stultz@linaro.org>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>

Thanks so much. Fix integrated into my tree.
-john

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

* [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings
  2021-02-05 15:02 [RFC][PATCH v6 6/7] dma-buf: system_heap: Add drm pagepool support to system heap kernel test robot
@ 2021-02-05 15:02 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-02-05 15:02 UTC (permalink / raw)
  To: kbuild

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

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 <john.stultz@linaro.org>

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

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


 Remove unneeded variable used to store return value.

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

CC: John Stultz <john.stultz@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/John-Stultz/Generic-page-pool-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 = 0;
 
 	for_each_sgtable_page(sgt, &piter, 0) {
 		p = 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)

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

* [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings
  2020-09-26  8:11 [RFC][PATCH 1/6] dma-buf: system_heap: Rework system heap to use sgtables instead of pagelists kernel test robot
@ 2020-09-26  8:11 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-09-26  8:11 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200926042453.67517-2-john.stultz@linaro.org>
References: <20200926042453.67517-2-john.stultz@linaro.org>
TO: John Stultz <john.stultz@linaro.org>

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

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


 Remove unneeded variable used to store return value.

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

CC: John Stultz <john.stultz@linaro.org>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/John-Stultz/dma-buf-Performance-improvements-for-system-heap/20200926-122541
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
:::::: branch date: 4 hours ago
:::::: commit date: 4 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
@@ -133,7 +133,6 @@ static int system_heap_dma_buf_begin_cpu
 {
 	struct system_heap_buffer *buffer = dmabuf->priv;
 	struct dma_heap_attachment *a;
-	int ret = 0;
 
 	mutex_lock(&buffer->lock);
 
@@ -146,7 +145,7 @@ static int system_heap_dma_buf_begin_cpu
 	}
 	mutex_unlock(&buffer->lock);
 
-	return ret;
+	return 0;
 }
 
 static int system_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,

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

end of thread, other threads:[~2021-02-05 15:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26 13:53 [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings Julia Lawall
2020-09-29 20:29 ` John Stultz
  -- strict thread matches above, loose matches on Subject: below --
2021-02-05 15:02 [RFC][PATCH v6 6/7] dma-buf: system_heap: Add drm pagepool support to system heap kernel test robot
2021-02-05 15:02 ` [PATCH] dma-buf: system_heap: fix returnvar.cocci warnings kernel test robot
2020-09-26  8:11 [RFC][PATCH 1/6] dma-buf: system_heap: Rework system heap to use sgtables instead of pagelists kernel test robot
2020-09-26  8:11 ` [PATCH] 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.