[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1567701424-25658-2-git-send-email-radhey.shyam.pandey@xilinx.com>
Date: Thu, 5 Sep 2019 22:06:57 +0530
From: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
To: vkoul@...nel.org, dan.j.williams@...el.com,
michal.simek@...inx.com, nick.graumann@...il.com,
andrea.merello@...il.com, appana.durga.rao@...inx.com,
mcgrof@...nel.org
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Subject: [PATCH -next 1/8] dmaengine: xilinx_dma: Remove desc_callback_valid check
In descriptor cleanup the call to desc_callback_valid can be safely
removed as both callback pointers i.e callback_result and callback
are anyway checked in invoke(). There is no much benefit in having
redundant checks.
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Signed-off-by: Nicholas Graumann <nick.graumann@...il.com>
Reviewed-by: Appana Durga Kedareswara rao <appana.durga.rao@...inx.com>
---
drivers/dma/xilinx/xilinx_dma.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index e7dc3c4..8bbf997 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -832,11 +832,9 @@ static void xilinx_dma_chan_desc_cleanup(struct xilinx_dma_chan *chan)
/* Run the link descriptor callback function */
dmaengine_desc_get_callback(&desc->async_tx, &cb);
- if (dmaengine_desc_callback_valid(&cb)) {
- spin_unlock_irqrestore(&chan->lock, flags);
- dmaengine_desc_callback_invoke(&cb, NULL);
- spin_lock_irqsave(&chan->lock, flags);
- }
+ spin_unlock_irqrestore(&chan->lock, flags);
+ dmaengine_desc_callback_invoke(&cb, NULL);
+ spin_lock_irqsave(&chan->lock, flags);
/* Run any dependencies, then free the descriptor */
dma_run_dependencies(&desc->async_tx);
--
2.7.4
Powered by blists - more mailing lists