projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f420039
)
dma-debug: add comment for failed to check map error
author
Miles Chen
<miles.chen@mediatek.com>
Wed, 22 Feb 2017 23:40:09 +0000
(15:40 -0800)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Thu, 23 Feb 2017 00:41:26 +0000
(16:41 -0800)
Add comment for failure to check a map error to help driver developers.
Link:
http://lkml.kernel.org/r/1484622289-22085-1-git-send-email-miles.chen@mediatek.com
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/dma-debug.c
patch
|
blob
|
history
diff --git
a/lib/dma-debug.c
b/lib/dma-debug.c
index 8971370bfb1619eb9d3acd332045129542092ee0..60c57ec936dbdcfaf4f0876274fa984ad2c9fd2b 100644
(file)
--- 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"