dma-buf: heaps: Remove unused variable ret
PATCH 1/1 dma-buf: heaps: Remove unused variable ret
This patch fixes below warnings reported by coccicheck
./drivers/dma-buf/heaps/heap-helpers.c:202:5-8: Unneeded variable: "ret". Return "0" on line 215
--- drivers/dma-buf/heaps/heap-helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma-buf/heaps/heap-helpers.c +1 -2
@@ -199,7 +199,6 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, {struct heap_helper_buffer *buffer = dmabuf->priv;struct dma_heaps_attachment *a; -int ret =0 ;mutex_lock (&buffer->lock);
@@ -212,7 +211,7 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, }mutex_unlock (&buffer->lock); -return ret; +return 0 ; } static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,
Signature · 1 line
2.6.2
Am 22.09.20 um 09:53 schrieb Zou Wei:
Quoted 5 lines
This patch fixes below warnings reported by coccicheck
./drivers/dma-buf/heaps/heap-helpers.c:202:5-8: Unneeded variable: "ret". Return "0" on line 215
Signed-off-by Zou Wei <[email protected]>
Going to pick this up for drm-misc-next.
Quoted 17 lines
--- drivers/dma-buf/heaps/heap-helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/dma-buf/heaps/heap-helpers.c +0
-1@@ -199,7 +199,6 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, {struct heap_helper_buffer *buffer = dmabuf->priv;struct dma_heaps_attachment *a; -int ret =0 ;mutex_lock (&buffer->lock);
drivers/dma-buf/heaps/heap-helpers.c static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, · line 217
Quoted 8 lines
drivers/dma-buf/heaps/heap-helpers.c +1
-1@@ -212,7 +211,7 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, }mutex_unlock (&buffer->lock); -return ret; +return 0 ; } static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hello Zou,
Quoted 11 lines · Christian König
Am 22.09.20 um 09:53 schrieb Zou Wei:
Quoted 5 lines
This patch fixes below warnings reported by coccicheck
./drivers/dma-buf/heaps/heap-helpers.c:202:5-8: Unneeded variable: "ret". Return "0" on line 215
Signed-off-by Zou Wei <[email protected]>Acked-by Christian König <[email protected]>Going to pick this up for drm-misc-next.
Thanks Christian!
Fwiw, feel free to add my
Quoted 21 lines
Quoted 21 lines
--- drivers/dma-buf/heaps/heap-helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/dma-buf/heaps/heap-helpers.c +0
-1@@ -199,7 +199,6 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, {struct heap_helper_buffer *buffer = dmabuf->priv;struct dma_heaps_attachment *a; -int ret =0 ;mutex_lock (&buffer->lock);@@ -212,7 +211,7 @@ static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, }mutex_unlock (&buffer->lock);
Quoted 6 lines
drivers/dma-buf/heaps/heap-helpers.c static int dma_heap_dma_buf_begin_cpu_access(struct dma_buf *dmabuf, · line 217
Quoted 5 lines
drivers/dma-buf/heaps/heap-helpers.c +1
-1-return ret; +return 0 ; } static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,
Best,
Sumit.