Commit e5a6b3d5 authored by Vinod Koul's avatar Vinod Koul

dmaengine: img-mdc: remove unused ‘prev_phys’

In mdc_prep_dma_memcpy(), mdc_prep_dma_cyclic() and mdc_prep_slave_sg()
variable ‘prev_phys’ is initialized but never used, which
leads to warning with W=1

drivers/dma/img-mdc-dma.c: In function ‘mdc_prep_dma_memcpy’:
drivers/dma/img-mdc-dma.c:295:24: warning: variable ‘prev_phys’ set but not used [-Wunused-but-set-variable]
  dma_addr_t curr_phys, prev_phys;

drivers/dma/img-mdc-dma.c: In function ‘mdc_prep_dma_cyclic’:
drivers/dma/img-mdc-dma.c:378:24: warning: variable ‘prev_phys’ set but not used [-Wunused-but-set-variable]
  dma_addr_t curr_phys, prev_phys;

drivers/dma/img-mdc-dma.c: In function ‘mdc_prep_slave_sg’:
drivers/dma/img-mdc-dma.c:461:24: warning: variable ‘prev_phys’ set but not
used [-Wunused-but-set-variable]
  dma_addr_t curr_phys, prev_phys;

So remove it.

Cc: Damien.Horsley <Damien.Horsley@imgtec.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 7833a31d
...@@ -292,7 +292,7 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_memcpy( ...@@ -292,7 +292,7 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_memcpy(
struct mdc_dma *mdma = mchan->mdma; struct mdc_dma *mdma = mchan->mdma;
struct mdc_tx_desc *mdesc; struct mdc_tx_desc *mdesc;
struct mdc_hw_list_desc *curr, *prev = NULL; struct mdc_hw_list_desc *curr, *prev = NULL;
dma_addr_t curr_phys, prev_phys; dma_addr_t curr_phys;
if (!len) if (!len)
return NULL; return NULL;
...@@ -324,7 +324,6 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_memcpy( ...@@ -324,7 +324,6 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_memcpy(
xfer_size); xfer_size);
prev = curr; prev = curr;
prev_phys = curr_phys;
mdesc->list_len++; mdesc->list_len++;
src += xfer_size; src += xfer_size;
...@@ -375,7 +374,7 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_cyclic( ...@@ -375,7 +374,7 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_cyclic(
struct mdc_dma *mdma = mchan->mdma; struct mdc_dma *mdma = mchan->mdma;
struct mdc_tx_desc *mdesc; struct mdc_tx_desc *mdesc;
struct mdc_hw_list_desc *curr, *prev = NULL; struct mdc_hw_list_desc *curr, *prev = NULL;
dma_addr_t curr_phys, prev_phys; dma_addr_t curr_phys;
if (!buf_len && !period_len) if (!buf_len && !period_len)
return NULL; return NULL;
...@@ -430,7 +429,6 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_cyclic( ...@@ -430,7 +429,6 @@ static struct dma_async_tx_descriptor *mdc_prep_dma_cyclic(
} }
prev = curr; prev = curr;
prev_phys = curr_phys;
mdesc->list_len++; mdesc->list_len++;
buf_addr += xfer_size; buf_addr += xfer_size;
...@@ -458,7 +456,7 @@ static struct dma_async_tx_descriptor *mdc_prep_slave_sg( ...@@ -458,7 +456,7 @@ static struct dma_async_tx_descriptor *mdc_prep_slave_sg(
struct mdc_tx_desc *mdesc; struct mdc_tx_desc *mdesc;
struct scatterlist *sg; struct scatterlist *sg;
struct mdc_hw_list_desc *curr, *prev = NULL; struct mdc_hw_list_desc *curr, *prev = NULL;
dma_addr_t curr_phys, prev_phys; dma_addr_t curr_phys;
unsigned int i; unsigned int i;
if (!sgl) if (!sgl)
...@@ -509,7 +507,6 @@ static struct dma_async_tx_descriptor *mdc_prep_slave_sg( ...@@ -509,7 +507,6 @@ static struct dma_async_tx_descriptor *mdc_prep_slave_sg(
} }
prev = curr; prev = curr;
prev_phys = curr_phys;
mdesc->list_len++; mdesc->list_len++;
mdesc->list_xfer_size += xfer_size; mdesc->list_xfer_size += xfer_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment