Commit a5759b2b authored by Miles Chen's avatar Miles Chen Committed by Linus Torvalds

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.comSigned-off-by: default avatarMiles Chen <miles.chen@mediatek.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f4200391
...@@ -1155,6 +1155,11 @@ static void check_unmap(struct dma_debug_entry *ref) ...@@ -1155,6 +1155,11 @@ static void check_unmap(struct dma_debug_entry *ref)
dir2name[ref->direction]); 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) { if (entry->map_err_type == MAP_ERR_NOT_CHECKED) {
err_printk(ref->dev, entry, err_printk(ref->dev, entry,
"DMA-API: device driver failed to check map error" "DMA-API: device driver failed to check map error"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment