Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Vinod Koul <vinod.koul@intel.com>

+3 -6
+3 -6
drivers/dma/img-mdc-dma.c
··· 292 292 struct mdc_dma *mdma = mchan->mdma; 293 293 struct mdc_tx_desc *mdesc; 294 294 struct mdc_hw_list_desc *curr, *prev = NULL; 295 - dma_addr_t curr_phys, prev_phys; 295 + dma_addr_t curr_phys; 296 296 297 297 if (!len) 298 298 return NULL; ··· 324 324 xfer_size); 325 325 326 326 prev = curr; 327 - prev_phys = curr_phys; 328 327 329 328 mdesc->list_len++; 330 329 src += xfer_size; ··· 374 375 struct mdc_dma *mdma = mchan->mdma; 375 376 struct mdc_tx_desc *mdesc; 376 377 struct mdc_hw_list_desc *curr, *prev = NULL; 377 - dma_addr_t curr_phys, prev_phys; 378 + dma_addr_t curr_phys; 378 379 379 380 if (!buf_len && !period_len) 380 381 return NULL; ··· 429 430 } 430 431 431 432 prev = curr; 432 - prev_phys = curr_phys; 433 433 434 434 mdesc->list_len++; 435 435 buf_addr += xfer_size; ··· 456 458 struct mdc_tx_desc *mdesc; 457 459 struct scatterlist *sg; 458 460 struct mdc_hw_list_desc *curr, *prev = NULL; 459 - dma_addr_t curr_phys, prev_phys; 461 + dma_addr_t curr_phys; 460 462 unsigned int i; 461 463 462 464 if (!sgl) ··· 507 509 } 508 510 509 511 prev = curr; 510 - prev_phys = curr_phys; 511 512 512 513 mdesc->list_len++; 513 514 mdesc->list_xfer_size += xfer_size;