Skip to content

Commit

Permalink
dmaengine: k3dma: dont use direction for memcpy
Browse files Browse the repository at this point in the history
Memcpy has no direction (copy from memory to memory) so remove the check
in prep_memcpy()

Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Vinod Koul committed Oct 7, 2018
1 parent dea7a9f commit ad7756e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/dma/k3dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,8 @@ static struct dma_async_tx_descriptor *k3_dma_prep_memcpy(
copy = min_t(size_t, len, DMA_MAX_SIZE);
k3_dma_fill_desc(ds, dst, src, copy, num++, c->ccfg);

if (c->dir == DMA_MEM_TO_DEV) {
src += copy;
} else if (c->dir == DMA_DEV_TO_MEM) {
dst += copy;
} else {
src += copy;
dst += copy;
}
src += copy;
dst += copy;
len -= copy;
} while (len);

Expand Down

0 comments on commit ad7756e

Please sign in to comment.