aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dma-debug.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-05-02 09:48:26 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-05-02 09:48:26 -0700
commit0337966d121ebebf73a1c346123e8112796e684e (patch)
treec0d4388591e72dc5a26ee976a9cbca70f6bafbbd /lib/dma-debug.c
parentInput: i8042 - add Clevo P650RS to the i8042 reset list (diff)
parentInput: ar1021_i2c - use BIT to check for a bit (diff)
downloadlinux-rng-0337966d121ebebf73a1c346123e8112796e684e.tar.xz
linux-rng-0337966d121ebebf73a1c346123e8112796e684e.zip
Merge branch 'next' into for-linus
Prepare input updates for 4.12 merge window.
Diffstat (limited to 'lib/dma-debug.c')
-rw-r--r--lib/dma-debug.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 8971370bfb16..b157b46cc9a6 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -17,8 +17,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <linux/sched/task_stack.h>
#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 +1157,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"