Thread (10 messages) 10 messages, 4 authors, 2018-11-15
STALE2773d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 2/4] dmaengine: xilinx_dma: Refactor axidma channel validation

From: Radhey Shyam Pandey <hidden>
Date: 2018-09-29 17:18:35
Also in: dmaengine, lkml
Subsystem: dma generic offload engine subsystem, the rest · Maintainers: Vinod Koul, Linus Torvalds

In axidma start_transfer, prefer checking channel states before
other params i.e pending_list. No functional change.

Signed-off-by: Radhey Shyam Pandey <redacted>
---
Changes for v2:
Modified the commit message to mark it as non-functional change.
---
 drivers/dma/xilinx/xilinx_dma.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 06d1632..a37871e 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1271,10 +1271,10 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
 	if (chan->err)
 		return;
 
-	if (list_empty(&chan->pending_list))
+	if (!chan->idle)
 		return;
 
-	if (!chan->idle)
+	if (list_empty(&chan->pending_list))
 		return;
 
 	head_desc = list_first_entry(&chan->pending_list,
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help