* [PATCH -next] dma-buf: heaps: Remove unused variable ret
@ 2020-09-22 7:53 Zou Wei
2020-09-22 12:41 ` Christian König
0 siblings, 1 reply; 3+ messages in thread
From: Zou Wei @ 2020-09-22 7:53 UTC (permalink / raw)
To: sumit.semwal, afd, benjamin.gaignard, lmark, labbott,
Brian.Starkey, john.stultz, christian.koenig
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel, Zou Wei
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 <zou_wei@huawei.com>
---
drivers/dma-buf/heaps/heap-helpers.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c
index d0696cf..7969510 100644
--- a/drivers/dma-buf/heaps/heap-helpers.c
+++ b/drivers/dma-buf/heaps/heap-helpers.c
@@ -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,
--
2.6.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] dma-buf: heaps: Remove unused variable ret
2020-09-22 7:53 [PATCH -next] dma-buf: heaps: Remove unused variable ret Zou Wei
@ 2020-09-22 12:41 ` Christian König
2020-09-22 14:51 ` Sumit Semwal
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2020-09-22 12:41 UTC (permalink / raw)
To: Zou Wei, sumit.semwal, afd, benjamin.gaignard, lmark, labbott,
Brian.Starkey, john.stultz
Cc: linux-media, dri-devel, linaro-mm-sig, linux-kernel
Am 22.09.20 um 09:53 schrieb Zou Wei:
> 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 <zou_wei@huawei.com>
Acked-by: Christian König <christian.koenig@amd.com>
Going to pick this up for drm-misc-next.
> ---
> drivers/dma-buf/heaps/heap-helpers.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c
> index d0696cf..7969510 100644
> --- a/drivers/dma-buf/heaps/heap-helpers.c
> +++ b/drivers/dma-buf/heaps/heap-helpers.c
> @@ -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,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] dma-buf: heaps: Remove unused variable ret
2020-09-22 12:41 ` Christian König
@ 2020-09-22 14:51 ` Sumit Semwal
0 siblings, 0 replies; 3+ messages in thread
From: Sumit Semwal @ 2020-09-22 14:51 UTC (permalink / raw)
To: Christian König
Cc: Zou Wei, Andrew F. Davis, (Exiting) Benjamin Gaignard, Liam Mark,
Laura Abbott, Brian Starkey, John Stultz,
open list:DMA BUFFER SHARING FRAMEWORK, DRI mailing list,
Linaro MM SIG, LKML
Hello Zou,
On Tue, 22 Sep 2020 at 18:12, Christian König <christian.koenig@amd.com> wrote:
>
> Am 22.09.20 um 09:53 schrieb Zou Wei:
> > 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 <zou_wei@huawei.com>
>
> Acked-by: Christian König <christian.koenig@amd.com>
>
> Going to pick this up for drm-misc-next.
Thanks Christian!
Fwiw, feel free to add my
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
>
> > ---
> > drivers/dma-buf/heaps/heap-helpers.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/dma-buf/heaps/heap-helpers.c b/drivers/dma-buf/heaps/heap-helpers.c
> > index d0696cf..7969510 100644
> > --- a/drivers/dma-buf/heaps/heap-helpers.c
> > +++ b/drivers/dma-buf/heaps/heap-helpers.c
> > @@ -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,
>
Best,
Sumit.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-22 14:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 7:53 [PATCH -next] dma-buf: heaps: Remove unused variable ret Zou Wei
2020-09-22 12:41 ` Christian König
2020-09-22 14:51 ` Sumit Semwal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).