diff options
author | Miles Chen <miles.chen@mediatek.com> | 2017-02-22 18:40:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 19:41:26 -0500 |
commit | a5759b2bffa807a727cbf6790ecdc4df2ae8e4d4 (patch) | |
tree | 5173968a55e0108695940050b419cab596bc9d37 /lib/dma-debug.c | |
parent | f42003917b4569a2f4f0c79c35e1e3df2859f81a (diff) |
dma-debug: add comment for failed to check map error
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>
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r-- | lib/dma-debug.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 8971370bfb16..60c57ec936db 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -1155,6 +1155,11 @@ static void check_unmap(struct dma_debug_entry *ref) | |||
1155 | dir2name[ref->direction]); | 1155 | dir2name[ref->direction]); |
1156 | } | 1156 | } |
1157 | 1157 | ||
1158 | /* | ||
1159 | * Drivers should use dma_mapping_error() to check the returned | ||
1160 | * addresses of dma_map_single() and dma_map_page(). | ||
1161 | * If not, print this warning message. See Documentation/DMA-API.txt. | ||
1162 | */ | ||
1158 | if (entry->map_err_type == MAP_ERR_NOT_CHECKED) { | 1163 | if (entry->map_err_type == MAP_ERR_NOT_CHECKED) { |
1159 | err_printk(ref->dev, entry, | 1164 | err_printk(ref->dev, entry, |
1160 | "DMA-API: device driver failed to check map error" | 1165 | "DMA-API: device driver failed to check map error" |