Skip to contentSkip to conversation

dma-debug: add comment for failed to check map error

PATCH Applied Miles Chen 1 participant 1 message Jan 17, 2017 Library code

lore
Share & tools
lore

Miles Chen

author
#0 lore raw

PATCH 1/1 dma-debug: add comment for failed to check map error

Add comment for failed to check map error to help driver developers.

---
 lib/dma-debug.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/dma-debug.c +5 -0
index 8971370..60c57ec 100644
@@ -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"
Signature · 1 line
1.9.1