Merge branch 'for-linus-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / lib / dma-debug.c
index fcb65d2..8855f01 100644 (file)
@@ -1249,6 +1249,14 @@ static void check_sync(struct device *dev,
                                dir2name[entry->direction],
                                dir2name[ref->direction]);
 
+       if (ref->sg_call_ents && ref->type == dma_debug_sg &&
+           ref->sg_call_ents != entry->sg_call_ents) {
+               err_printk(ref->dev, entry, "DMA-API: device driver syncs "
+                          "DMA sg list with different entry count "
+                          "[map count=%d] [sync count=%d]\n",
+                          entry->sg_call_ents, ref->sg_call_ents);
+       }
+
 out:
        put_hash_bucket(bucket, &flags);
 }