linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/28] dmaengine: use DMA_COMPLETE for dma completion status
Date: Thu, 17 Oct 2013 07:37:45 +0530	[thread overview]
Message-ID: <20131017020745.GA14013@intel.com> (raw)
In-Reply-To: <CAPcyv4hOZHmegDiPYmeVWzOUCasQaixzCzpLHs37i7RZznhGsA@mail.gmail.com>

On Wed, Oct 16, 2013 at 11:45:48AM -0700, Dan Williams wrote:
> On Wed, Oct 16, 2013 at 11:29 AM, Guennadi Liakhovetski
> >
> > Doesn't this break kernel compilation for a total of 27 commits? Or am I
> > missing anything?
> 
> Yes, I think at the start DMA_COMPLETE should just be a alias for
> DMA_SUCCESS, then after all the driver renames are in delete
> DMA_SUCCESS.
Oops, taht was bad of me. ffixes in v2 and sending patch 29 for removal case

--

>From 7768309422a1345d32857974fe8b57805adfd561 Mon Sep 17 00:00:00 2001
From: Vinod Koul <vinod.koul@intel.com>
Date: Wed, 16 Oct 2013 13:29:02 +0530
Subject: [PATCH] dmaengine: use DMA_COMPLETE for dma completion status

the DMA_SUCCESS is a misnomer as dmaengine indicates the transfer is complete and
gives no guarantee of the transfer success. Hence we should use DMA_COMPLTE
instead of DMA_SUCCESS

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/dmaengine.c   |    2 +-
 include/linux/dmaengine.h |   13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 9162ac8..81d8765 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -1062,7 +1062,7 @@ dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
 	unsigned long dma_sync_wait_timeout = jiffies + msecs_to_jiffies(5000);
 
 	if (!tx)
-		return DMA_SUCCESS;
+		return DMA_COMPLETE;
 
 	while (tx->cookie == -EBUSY) {
 		if (time_after_eq(jiffies, dma_sync_wait_timeout)) {
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 0bc7275..683c380 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -45,16 +45,17 @@ static inline int dma_submit_error(dma_cookie_t cookie)
 
 /**
  * enum dma_status - DMA transaction status
- * @DMA_SUCCESS: transaction completed successfully
+ * @DMA_COMPLETE: transaction completed
  * @DMA_IN_PROGRESS: transaction not yet processed
  * @DMA_PAUSED: transaction is paused
  * @DMA_ERROR: transaction failed
  */
 enum dma_status {
-	DMA_SUCCESS,
+	DMA_COMPLETE,
 	DMA_IN_PROGRESS,
 	DMA_PAUSED,
 	DMA_ERROR,
+	DMA_SUCCESS,
 };
 
 /**
@@ -979,10 +980,10 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
 {
 	if (last_complete <= last_used) {
 		if ((cookie <= last_complete) || (cookie > last_used))
-			return DMA_SUCCESS;
+			return DMA_COMPLETE;
 	} else {
 		if ((cookie <= last_complete) && (cookie > last_used))
-			return DMA_SUCCESS;
+			return DMA_COMPLETE;
 	}
 	return DMA_IN_PROGRESS;
 }
@@ -1013,11 +1014,11 @@ static inline struct dma_chan *dma_find_channel(enum dma_transaction_type tx_typ
 }
 static inline enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
 {
-	return DMA_SUCCESS;
+	return DMA_COMPLETE;
 }
 static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
 {
-	return DMA_SUCCESS;
+	return DMA_COMPLETE;
 }
 static inline void dma_issue_pending_all(void)
 {
-- 
1.7.0.4

-- 

  reply	other threads:[~2013-10-17  2:07 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 16:28 [PATCH 00/28]: dmaengine: use DMA_COMPLETE for dma completion status Vinod Koul
2013-10-16 16:28 ` [PATCH 01/28] " Vinod Koul
2013-10-16 18:29   ` Guennadi Liakhovetski
2013-10-16 18:45     ` Dan Williams
2013-10-17  2:07       ` Vinod Koul [this message]
2013-10-17  8:27         ` Guennadi Liakhovetski
2013-10-17  9:53           ` Vinod Koul
2013-10-17 14:27         ` Sebastian Andrzej Siewior
2013-10-17 13:48           ` Vinod Koul
2013-10-24 21:28             ` Guennadi Liakhovetski
2013-10-25  4:23               ` Vinod Koul
2013-10-25  6:32                 ` Guennadi Liakhovetski
2013-10-25  5:43                   ` Vinod Koul
2013-10-25  6:43                     ` Guennadi Liakhovetski
2013-10-29 16:47                       ` Olof Johansson
2013-10-30 13:03                         ` Vinod Koul
2013-11-04 12:51                           ` Sebastian Andrzej Siewior
2013-11-11 19:13                           ` Olof Johansson
2013-11-12  4:00                             ` Vinod Koul
2013-11-12  5:11                               ` Olof Johansson
2013-11-12  4:47                                 ` Vinod Koul
2013-10-17 14:39           ` Guennadi Liakhovetski
2013-10-16 16:28 ` [PATCH 02/28] dmaengine: amba-pl08x: " Vinod Koul
2013-10-16 16:28 ` [PATCH 03/28] dmaengine: at_hdma: " Vinod Koul
2013-10-17  8:08   ` Nicolas Ferre
2013-10-16 16:28 ` [PATCH 04/28] dmaengine: coh901318: " Vinod Koul
2013-10-16 16:28 ` [PATCH 05/28] dmaengine: cppi41: " Vinod Koul
2013-10-16 16:28 ` [PATCH 06/28] dmaengine: jz4740: " Vinod Koul
2013-10-16 16:28 ` [PATCH 07/28] dmaengine: dmatest: " Vinod Koul
2013-10-16 16:28 ` [PATCH 08/28] dmaengine: dw: " Vinod Koul
2013-10-17 13:43   ` Andy Shevchenko
2013-10-21  7:33   ` Viresh Kumar
2013-10-16 16:28 ` [PATCH 09/28] dmaengine: edma: " Vinod Koul
2013-10-17  0:31   ` Joel Fernandes
2013-10-16 16:28 ` [PATCH 10/28] dmaengine: imx-dma: " Vinod Koul
2013-10-16 16:28 ` [PATCH 11/28] dmaengine: imx-sdma: " Vinod Koul
2013-10-16 16:28 ` [PATCH 12/28] dmaengine: intel_mid_dma: " Vinod Koul
2013-10-16 16:28 ` [PATCH 13/28] dmaengine: ioat: " Vinod Koul
2013-10-16 16:28 ` [PATCH 14/28] dmaengine: iop: " Vinod Koul
2013-10-16 16:28 ` [PATCH 15/28] dmaengine: k3dma: " Vinod Koul
2013-10-17 14:18   ` zhangfei gao
2013-10-16 16:28 ` [PATCH 16/28] dmaengine: mmp_tdma: " Vinod Koul
2013-10-17 14:19   ` zhangfei gao
2013-10-16 16:28 ` [PATCH 17/28] dmaengine: mv_xor: " Vinod Koul
2013-10-16 16:28 ` [PATCH 18/28] dmaengine: mxs-dma: " Vinod Koul
2013-10-16 16:28 ` [PATCH 19/28] dmaengine: omap: " Vinod Koul
2013-10-16 16:28 ` [PATCH 20/28] dmaengine: ppc4xx: " Vinod Koul
2013-10-16 16:28 ` [PATCH 21/28] dmaengine: sa11x0: " Vinod Koul
2013-10-16 16:28 ` [PATCH 22/28] dmaengine: sh: " Vinod Koul
2013-10-16 16:28 ` [PATCH 23/28] dmaengine: ste: " Vinod Koul
2013-10-16 16:28 ` [PATCH 24/28] dmaengine: tegra: " Vinod Koul
2013-10-16 16:28 ` [PATCH 25/28] dmaengine: txx9: " Vinod Koul
2013-10-16 16:28 ` [PATCH 26/28] async_tx: " Vinod Koul
2013-10-16 16:28 ` [PATCH 27/28] serial: sh: " Vinod Koul
2013-10-16 20:17   ` Greg Kroah-Hartman
2013-10-16 16:28 ` [PATCH 28/28] net: " Vinod Koul
2013-10-17  2:16   ` [PATCH 29/29] dmaengine: remove unused DMA_SUCCESS Vinod Koul
2013-10-17  4:55   ` [PATCH 28/28] net: use DMA_COMPLETE for dma completion status David Miller
2013-10-17  9:00 ` [PATCH 00/28]: dmaengine: " Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131017020745.GA14013@intel.com \
    --to=vinod.koul@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).