drm/mm: WARN for unclean mm takedown
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 1 Jul 2013 20:01:04 +0000 (22:01 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 4 Jul 2013 00:01:12 +0000 (10:01 +1000)
The usual drm driver has tons of different drm_mm memory managers so the drm
error message in dmesg is pretty useless. WARN instead so that we have the full
backtrace.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_mm.c

index e05c3cea322c4c279c48987a4fc2729432f78f7c..543b9b3171d32310de903668bc69f30901b12e91 100644 (file)
@@ -697,8 +697,8 @@ void drm_mm_takedown(struct drm_mm * mm)
 {
        struct drm_mm_node *entry, *next;
 
-       if (!list_empty(&mm->head_node.node_list)) {
-               DRM_ERROR("Memory manager not clean. Delaying takedown\n");
+       if (WARN(!list_empty(&mm->head_node.node_list),
+                "Memory manager not clean. Delaying takedown\n")) {
                return;
        }