diff mbox

[10/13] dmaengine: stm32-dma: remove unused ‘src_addr’

Message ID 1481305856-15206-11-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_set_xfer_param(), variable ‘src_addr’ is initialized but never used, which
leads to warning with W=1

drivers/dma/stm32-dma.c: In function ‘stm32_dma_set_xfer_param’:
drivers/dma/stm32-dma.c:577:13: warning: variable ‘src_addr’ set but not used [-Wunused-but-set-variable]
  dma_addr_t src_addr, dst_addr;

So remove it.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/stm32-dma.c | 2 --
 1 file changed, 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_set_xfer_param(), variable ‘src_addr’ is initialized but never used, which
> leads to warning with W=1
>
> drivers/dma/stm32-dma.c: In function ‘stm32_dma_set_xfer_param’:
> drivers/dma/stm32-dma.c:577:13: warning: variable ‘src_addr’ set but not used [-Wunused-but-set-variable]
>   dma_addr_t src_addr, dst_addr;
>
> So remove it.
>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  drivers/dma/stm32-dma.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
> index 1f09189e31d9..3688d0873a3e 100644
> --- a/drivers/dma/stm32-dma.c
> +++ b/drivers/dma/stm32-dma.c
> @@ -573,14 +573,12 @@ static int stm32_dma_set_xfer_param(struct stm32_dma_chan *chan,
>         int src_bus_width, dst_bus_width;
>         int src_burst_size, dst_burst_size;
>         u32 src_maxburst, dst_maxburst;
> -       dma_addr_t src_addr;
>         u32 dma_scr = 0;
>
>         src_addr_width = chan->dma_sconfig.src_addr_width;
>         dst_addr_width = chan->dma_sconfig.dst_addr_width;
>         src_maxburst = chan->dma_sconfig.src_maxburst;
>         dst_maxburst = chan->dma_sconfig.dst_maxburst;
> -       src_addr = chan->dma_sconfig.src_addr;
>
>         switch (direction) {
>         case DMA_MEM_TO_DEV:
> --
> 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 1f09189e31d9..3688d0873a3e 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -573,14 +573,12 @@  static int stm32_dma_set_xfer_param(struct stm32_dma_chan *chan,
 	int src_bus_width, dst_bus_width;
 	int src_burst_size, dst_burst_size;
 	u32 src_maxburst, dst_maxburst;
-	dma_addr_t src_addr;
 	u32 dma_scr = 0;
 
 	src_addr_width = chan->dma_sconfig.src_addr_width;
 	dst_addr_width = chan->dma_sconfig.dst_addr_width;
 	src_maxburst = chan->dma_sconfig.src_maxburst;
 	dst_maxburst = chan->dma_sconfig.dst_maxburst;
-	src_addr = chan->dma_sconfig.src_addr;
 
 	switch (direction) {
 	case DMA_MEM_TO_DEV: