* [PATCH] dma-debug: add comment for failed to check map error
@ 2017-01-17 3:04 Miles Chen
0 siblings, 0 replies; only message in thread
From: Miles Chen @ 2017-01-17 3:04 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, wsd_upstream, Miles Chen
Add comment for failed to check map error to help driver
developers.
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
---
lib/dma-debug.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 8971370..60c57ec 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -1155,6 +1155,11 @@ static void check_unmap(struct dma_debug_entry *ref)
dir2name[ref->direction]);
}
+ /*
+ * Drivers should use dma_mapping_error() to check the returned
+ * addresses of dma_map_single() and dma_map_page().
+ * If not, print this warning message. See Documentation/DMA-API.txt.
+ */
if (entry->map_err_type == MAP_ERR_NOT_CHECKED) {
err_printk(ref->dev, entry,
"DMA-API: device driver failed to check map error"
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-17 3:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 3:04 [PATCH] dma-debug: add comment for failed to check map error Miles Chen
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).