Skip to content

Commit 9bef492

Browse files
ColinIanKingvinodkoul
authored andcommitted
dmaengine: fsl-edma: remove redundant assignment to pointer last_sg
The pointer last_sg is being assigned a value at the start of a loop however it is never read and is being re-assigned later on in both brances of an if-statement. The assignment is redundant and can be removed. Cleans up clang scan-build warning: drivers/dma/fsl-edma-common.c:563:3: warning: Value stored to 'last_sg' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220614184759.164379-1-colin.i.king@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 8d8bbef commit 9bef492

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/dma/fsl-edma-common.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,6 @@ struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg(
559559
}
560560

561561
for_each_sg(sgl, sg, sg_len, i) {
562-
/* get next sg's physical address */
563-
last_sg = fsl_desc->tcd[(i + 1) % sg_len].ptcd;
564-
565562
if (direction == DMA_MEM_TO_DEV) {
566563
src_addr = sg_dma_address(sg);
567564
dst_addr = fsl_chan->dma_dev_addr;

0 commit comments

Comments
 (0)