diff mbox

dmaengine: zynqmp_dma: Remove max len check in zynqmp_dma_prep_memcpy

Message ID 20170623090549.3443-1-sr@denx.de (mailing list archive)
State Accepted
Headers show

Commit Message

Stefan Roese June 23, 2017, 9:05 a.m. UTC
Remove check for "len > ZYNQMP_DMA_MAX_TRANS_LEN" as its not needed.
If the length is larger, the transfer is split up into multiple parts
with the max descriptor length already.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Kedareswara rao Appana <appanad@xilinx.com>
Cc: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/xilinx/zynqmp_dma.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Vinod Koul July 3, 2017, 5:07 a.m. UTC | #1
On Fri, Jun 23, 2017 at 11:05:49AM +0200, Stefan Roese wrote:
> Remove check for "len > ZYNQMP_DMA_MAX_TRANS_LEN" as its not needed.
> If the length is larger, the transfer is split up into multiple parts
> with the max descriptor length already.

Applied, thanks
diff mbox

Patch

diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 6d221e5c72ee..47f64192d2fd 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -794,9 +794,6 @@  static struct dma_async_tx_descriptor *zynqmp_dma_prep_memcpy(
 
 	chan = to_chan(dchan);
 
-	if (len > ZYNQMP_DMA_MAX_TRANS_LEN)
-		return NULL;
-
 	desc_cnt = DIV_ROUND_UP(len, ZYNQMP_DMA_MAX_TRANS_LEN);
 
 	spin_lock_bh(&chan->lock);