]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - lib/dma-debug.c
sched/headers: Prepare for new header dependencies before moving code to <linux/sched...
[mirror_ubuntu-artful-kernel.git] / lib / dma-debug.c
index 8971370bfb1619eb9d3acd332045129542092ee0..942adf13418d058cee2260d2e0322fcc545a0988 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <linux/scatterlist.h>
 #include <linux/dma-mapping.h>
+#include <linux/sched/task.h>
 #include <linux/stacktrace.h>
 #include <linux/dma-debug.h>
 #include <linux/spinlock.h>
@@ -1155,6 +1156,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"