aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2011-05-06 17:47:53 -0400
committerDave Airlie <airlied@redhat.com>2011-05-08 19:14:45 -0400
commit2bbd4492552867053b5a618a2474297e2b1c355d (patch)
tree13f6e611009a3175af2aeebecb5a1d65cf3cd205
parentff68146acb98b689947692bffd38ec4ad67eb1cb (diff)
drm: mm: fix debug output
The looping helper didn't do anything due to a superficial semicolon. Furthermore one of the two dump functions suffered from copy&paste fail. While staring at the code I've also noticed that the replace helper (currently unused) is a bit broken. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_mm.c6
-rw-r--r--include/drm/drm_mm.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 5d00b0fc0d91..959186cbf328 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -431,7 +431,7 @@ EXPORT_SYMBOL(drm_mm_search_free_in_range);
431void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new) 431void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new)
432{ 432{
433 list_replace(&old->node_list, &new->node_list); 433 list_replace(&old->node_list, &new->node_list);
434 list_replace(&old->node_list, &new->hole_stack); 434 list_replace(&old->hole_stack, &new->hole_stack);
435 new->hole_follows = old->hole_follows; 435 new->hole_follows = old->hole_follows;
436 new->mm = old->mm; 436 new->mm = old->mm;
437 new->start = old->start; 437 new->start = old->start;
@@ -699,8 +699,8 @@ int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm)
699 entry->size); 699 entry->size);
700 total_used += entry->size; 700 total_used += entry->size;
701 if (entry->hole_follows) { 701 if (entry->hole_follows) {
702 hole_start = drm_mm_hole_node_start(&mm->head_node); 702 hole_start = drm_mm_hole_node_start(entry);
703 hole_end = drm_mm_hole_node_end(&mm->head_node); 703 hole_end = drm_mm_hole_node_end(entry);
704 hole_size = hole_end - hole_start; 704 hole_size = hole_end - hole_start;
705 seq_printf(m, "0x%08lx-0x%08lx: 0x%08lx: free\n", 705 seq_printf(m, "0x%08lx-0x%08lx: 0x%08lx: free\n",
706 hole_start, hole_end, hole_size); 706 hole_start, hole_end, hole_size);
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index c2f93a8ae2e1..564b14aa7e16 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -86,7 +86,7 @@ static inline bool drm_mm_initialized(struct drm_mm *mm)
86} 86}
87#define drm_mm_for_each_node(entry, mm) list_for_each_entry(entry, \ 87#define drm_mm_for_each_node(entry, mm) list_for_each_entry(entry, \
88 &(mm)->head_node.node_list, \ 88 &(mm)->head_node.node_list, \
89 node_list); 89 node_list)
90#define drm_mm_for_each_scanned_node_reverse(entry, n, mm) \ 90#define drm_mm_for_each_scanned_node_reverse(entry, n, mm) \
91 for (entry = (mm)->prev_scanned_node, \ 91 for (entry = (mm)->prev_scanned_node, \
92 next = entry ? list_entry(entry->node_list.next, \ 92 next = entry ? list_entry(entry->node_list.next, \