linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] dmaengine: sf-pdma: Remove set but not used variable "desc"
@ 2020-09-17  7:17 Liu Shixin
  2020-09-18  7:10 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Shixin @ 2020-09-17  7:17 UTC (permalink / raw)
  To: Green Wan, Vinod Koul, Dan Williams; +Cc: dmaengine, linux-kernel, Liu Shixin

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/dma/sf-pdma/sf-pdma.c: In function 'sf_pdma_donebh_tasklet':
drivers/dma/sf-pdma/sf-pdma.c:287:23: warning: unused variable 'desc' [-Wunused-variable]

After commit 8f6b6d060602 ("dmaengine: sf-pdma: Fix an error that calls callback twice"),
variable 'desc' is never used. Remove it to avoid build warning.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/dma/sf-pdma/sf-pdma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
index 754994087e5f..1e66c6990d81 100644
--- a/drivers/dma/sf-pdma/sf-pdma.c
+++ b/drivers/dma/sf-pdma/sf-pdma.c
@@ -284,7 +284,6 @@ static void sf_pdma_free_desc(struct virt_dma_desc *vdesc)
 static void sf_pdma_donebh_tasklet(unsigned long arg)
 {
 	struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
-	struct sf_pdma_desc *desc = chan->desc;
 	unsigned long flags;
 
 	spin_lock_irqsave(&chan->lock, flags);
-- 
2.25.1


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

* Re: [PATCH -next] dmaengine: sf-pdma: Remove set but not used variable "desc"
  2020-09-17  7:17 [PATCH -next] dmaengine: sf-pdma: Remove set but not used variable "desc" Liu Shixin
@ 2020-09-18  7:10 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-09-18  7:10 UTC (permalink / raw)
  To: Liu Shixin; +Cc: Green Wan, Dan Williams, dmaengine, linux-kernel

On 17-09-20, 15:17, Liu Shixin wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/dma/sf-pdma/sf-pdma.c: In function 'sf_pdma_donebh_tasklet':
> drivers/dma/sf-pdma/sf-pdma.c:287:23: warning: unused variable 'desc' [-Wunused-variable]
> 
> After commit 8f6b6d060602 ("dmaengine: sf-pdma: Fix an error that calls callback twice"),
> variable 'desc' is never used. Remove it to avoid build warning.

This was already reported by SFR and patch posted, so picked that one

> 
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
>  drivers/dma/sf-pdma/sf-pdma.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
> index 754994087e5f..1e66c6990d81 100644
> --- a/drivers/dma/sf-pdma/sf-pdma.c
> +++ b/drivers/dma/sf-pdma/sf-pdma.c
> @@ -284,7 +284,6 @@ static void sf_pdma_free_desc(struct virt_dma_desc *vdesc)
>  static void sf_pdma_donebh_tasklet(unsigned long arg)
>  {
>  	struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
> -	struct sf_pdma_desc *desc = chan->desc;
>  	unsigned long flags;
>  
>  	spin_lock_irqsave(&chan->lock, flags);
> -- 
> 2.25.1

-- 
~Vinod

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

end of thread, other threads:[~2020-09-18  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17  7:17 [PATCH -next] dmaengine: sf-pdma: Remove set but not used variable "desc" Liu Shixin
2020-09-18  7:10 ` Vinod Koul

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).