diff mbox

[08/13] dmaengine: stm32-dma: remove unused ‘sfcr’

Message ID 1481305856-15206-9-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Vinod Koul Dec. 9, 2016, 5:50 p.m. UTC
In stm32_dma_chan_irq(), variable ‘sfcr’ is initialized but never used, which
leads to warning with W=1

drivers/dma/stm32-dma.c: In function ‘stm32_dma_chan_irq’:
drivers/dma/stm32-dma.c:530:19: warning: variable ‘sfcr’ set but not used [-Wunused-but-set-variable]
  u32 status, scr, sfcr;

So remove it.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/stm32-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

M'boumba Cedric Madianga Dec. 12, 2016, 8:27 a.m. UTC | #1
Reviewed-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com>

2016-12-09 18:50 GMT+01:00 Vinod Koul <vinod.koul@intel.com>:
> In stm32_dma_chan_irq(), variable ‘sfcr’ is initialized but never used, which
> leads to warning with W=1
>
> drivers/dma/stm32-dma.c: In function ‘stm32_dma_chan_irq’:
> drivers/dma/stm32-dma.c:530:19: warning: variable ‘sfcr’ set but not used [-Wunused-but-set-variable]
>   u32 status, scr, sfcr;
>
> So remove it.
>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  drivers/dma/stm32-dma.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
> index 307547f4848d..7f18192774e4 100644
> --- a/drivers/dma/stm32-dma.c
> +++ b/drivers/dma/stm32-dma.c
> @@ -527,13 +527,12 @@ static irqreturn_t stm32_dma_chan_irq(int irq, void *devid)
>  {
>         struct stm32_dma_chan *chan = devid;
>         struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
> -       u32 status, scr, sfcr;
> +       u32 status, scr;
>
>         spin_lock(&chan->vchan.lock);
>
>         status = stm32_dma_irq_status(chan);
>         scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id));
> -       sfcr = stm32_dma_read(dmadev, STM32_DMA_SFCR(chan->id));
>
>         if ((status & STM32_DMA_TCI) && (scr & STM32_DMA_SCR_TCIE)) {
>                 stm32_dma_irq_clear(chan, STM32_DMA_TCI);
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
index 307547f4848d..7f18192774e4 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -527,13 +527,12 @@  static irqreturn_t stm32_dma_chan_irq(int irq, void *devid)
 {
 	struct stm32_dma_chan *chan = devid;
 	struct stm32_dma_device *dmadev = stm32_dma_get_dev(chan);
-	u32 status, scr, sfcr;
+	u32 status, scr;
 
 	spin_lock(&chan->vchan.lock);
 
 	status = stm32_dma_irq_status(chan);
 	scr = stm32_dma_read(dmadev, STM32_DMA_SCR(chan->id));
-	sfcr = stm32_dma_read(dmadev, STM32_DMA_SFCR(chan->id));
 
 	if ((status & STM32_DMA_TCI) && (scr & STM32_DMA_SCR_TCIE)) {
 		stm32_dma_irq_clear(chan, STM32_DMA_TCI);