From patchwork Fri May 6 21:47:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 763272 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p46LmEQt025531 for ; Fri, 6 May 2011 21:48:35 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 701F19ED8A for ; Fri, 6 May 2011 14:48:12 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ww0-f43.google.com (mail-ww0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 85D6A9E7B6 for ; Fri, 6 May 2011 14:48:04 -0700 (PDT) Received: by wwb17 with SMTP id 17so3266725wwb.12 for ; Fri, 06 May 2011 14:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=lrOnPWew1FcOkiqguvNLp6l9FNr4tnJ5+sMLr+DjxM4=; b=Ric906Z+BtrQP302IULK3u+N9UTSju/Jpns5IFQOnTr2Z0/zHz9Vu/7TSPTMmHaIfs LF4V5tT/QsoMbpb7496APQ8sWkF3BoqeM9BTnpW5wCKw2dzhNVTG73Yz98lG1BqFn+gb stsoQp5xU1eJla3Gk9xzFswySw+oGFdRfV+ag= DomainKey-Signature: a=rsa-sha1; c=nofws; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer; b=EFOo2YIKbZPS3V5Fg3o0wnX000gjtcVxOYEa8YFySsDbhb03Rc+oNZCl+aJX0tbPtv Du/X1BfpV4F/xctwhrg8Z7AhYThwOhtWc2GDfS3x7CaBbxYygmURu6sjJeS50P0OKeOv CgQnh+iOp0LwiRCzd/hSlYVEbVym7DLX4zx3s= Received: by 10.216.220.139 with SMTP id o11mr4317229wep.12.1304718483057; Fri, 06 May 2011 14:48:03 -0700 (PDT) Received: from localhost.localdomain (cable-static-216-166.intergga.ch [87.102.216.166]) by mx.google.com with ESMTPS id d6sm1837601wer.2.2011.05.06.14.48.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 06 May 2011 14:48:02 -0700 (PDT) From: Daniel Vetter To: Dave Airlie Subject: [PATCH] drm: mm: fix debug output Date: Fri, 6 May 2011 23:47:53 +0200 Message-Id: <1304718473-2299-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.5.1 Cc: Daniel Vetter , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 06 May 2011 21:48:35 +0000 (UTC) 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 --- drivers/gpu/drm/drm_mm.c | 6 +++--- include/drm/drm_mm.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 5d00b0f..959186c 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); void drm_mm_replace_node(struct drm_mm_node *old, struct drm_mm_node *new) { list_replace(&old->node_list, &new->node_list); - list_replace(&old->node_list, &new->hole_stack); + list_replace(&old->hole_stack, &new->hole_stack); new->hole_follows = old->hole_follows; new->mm = old->mm; new->start = old->start; @@ -699,8 +699,8 @@ int drm_mm_dump_table(struct seq_file *m, struct drm_mm *mm) entry->size); total_used += entry->size; if (entry->hole_follows) { - hole_start = drm_mm_hole_node_start(&mm->head_node); - hole_end = drm_mm_hole_node_end(&mm->head_node); + hole_start = drm_mm_hole_node_start(entry); + hole_end = drm_mm_hole_node_end(entry); hole_size = hole_end - hole_start; seq_printf(m, "0x%08lx-0x%08lx: 0x%08lx: free\n", hole_start, hole_end, hole_size); diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index c2f93a8..564b14a 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) } #define drm_mm_for_each_node(entry, mm) list_for_each_entry(entry, \ &(mm)->head_node.node_list, \ - node_list); + node_list) #define drm_mm_for_each_scanned_node_reverse(entry, n, mm) \ for (entry = (mm)->prev_scanned_node, \ next = entry ? list_entry(entry->node_list.next, \