From: Jon Mason <jon.mason@intel.com>
To: Dan Williams <djbw@fb.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] dmadevices: dma_sync_wait undefined
Date: Tue, 18 Jun 2013 17:46:52 -0700 [thread overview]
Message-ID: <1371602813-19828-2-git-send-email-jon.mason@intel.com> (raw)
In-Reply-To: <1371602813-19828-1-git-send-email-jon.mason@intel.com>
dma_sync_wait is declared regardless of whether CONFIG_DMA_ENGINE is
enabled, but calling the function without CONFIG_DMA_ENGINE enabled
results in the following gcc error.
ERROR: "dma_sync_wait" [drivers/ntb/ntb.ko] undefined!
To get around this, declare dma_sync_wait as an inline function if
CONFIG_DMA_ENGINE is undefined.
Signed-off-by: Jon Mason <jon.mason@intel.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
---
include/linux/dmaengine.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 96d3e4a..e3652ac 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -963,8 +963,8 @@ dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used,
}
}
-enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
#ifdef CONFIG_DMA_ENGINE
+enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
void dma_issue_pending_all(void);
struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask,
@@ -972,6 +972,10 @@ struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask,
struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name);
void dma_release_channel(struct dma_chan *chan);
#else
+static inline enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie)
+{
+ return DMA_SUCCESS;
+}
static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
{
return DMA_SUCCESS;
--
1.7.9.5
next prev parent reply other threads:[~2013-06-19 0:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 0:46 [PATCH 0/2] DMA Offload fixes Jon Mason
2013-06-19 0:46 ` Jon Mason [this message]
2013-06-19 1:13 ` [PATCH 1/2] dmadevices: dma_sync_wait undefined Dan Williams
2013-06-19 16:28 ` Jon Mason
2013-06-20 21:20 ` Dan Williams
2013-06-26 23:47 ` Jon Mason
2013-06-19 0:46 ` [PATCH 2/2] ioatdma: add DMA_PRIVATE capabilities flag Jon Mason
2013-06-19 0:59 ` Dan Williams
2013-06-19 17:36 ` Dave Jiang
2013-06-19 17:52 ` Jon Mason
2013-06-19 18:56 ` Dan Williams
2013-06-19 20:10 ` Jon Mason
2013-06-19 20:44 ` Dan Williams
2013-06-26 23:55 ` Jon Mason
2013-06-27 1:10 ` Dan Williams
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=1371602813-19828-2-git-send-email-jon.mason@intel.com \
--to=jon.mason@intel.com \
--cc=dave.jiang@intel.com \
--cc=djbw@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
/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