All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 01/11] drm: use list_for_each_entry in drm_mm.c
Date: Fri,  2 Jul 2010 15:02:11 +0100	[thread overview]
Message-ID: <1278079341-3630-2-git-send-email-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <1278079341-3630-1-git-send-email-chris@chris-wilson.co.uk>

From: Daniel Vetter <daniel.vetter@ffwll.ch>

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Thomas Hellstrom <thellstrom@vmwgfx.com>
---
 drivers/gpu/drm/drm_mm.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 2ac074c..b75eb55 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -332,7 +332,6 @@ struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm,
 				       unsigned long size,
 				       unsigned alignment, int best_match)
 {
-	struct list_head *list;
 	const struct list_head *free_stack = &mm->fl_entry;
 	struct drm_mm_node *entry;
 	struct drm_mm_node *best;
@@ -342,8 +341,7 @@ struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm,
 	best = NULL;
 	best_size = ~0UL;
 
-	list_for_each(list, free_stack) {
-		entry = list_entry(list, struct drm_mm_node, fl_entry);
+	list_for_each_entry(entry, free_stack, fl_entry) {
 		wasted = 0;
 
 		if (entry->size < size)
@@ -376,7 +374,6 @@ struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm,
 						unsigned long end,
 						int best_match)
 {
-	struct list_head *list;
 	const struct list_head *free_stack = &mm->fl_entry;
 	struct drm_mm_node *entry;
 	struct drm_mm_node *best;
@@ -386,8 +383,7 @@ struct drm_mm_node *drm_mm_search_free_in_range(const struct drm_mm *mm,
 	best = NULL;
 	best_size = ~0UL;
 
-	list_for_each(list, free_stack) {
-		entry = list_entry(list, struct drm_mm_node, fl_entry);
+	list_for_each_entry(entry, free_stack, fl_entry) {
 		wasted = 0;
 
 		if (entry->size < size)
-- 
1.7.1

  reply	other threads:[~2010-07-02 14:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02 14:02 Fair eviction for i915, based on Daniel's drm_mm scanner Chris Wilson
2010-07-02 14:02 ` Chris Wilson [this message]
2010-07-02 14:02 ` [PATCH 02/11] drm: kill drm_mm_node->private Chris Wilson
2010-07-02 14:02 ` [PATCH 03/11] drm: kill dead code in drm_mm.c Chris Wilson
2010-07-02 14:02 ` [PATCH 04/11] drm: sane naming for drm_mm.c Chris Wilson
2010-07-02 14:02 ` [PATCH 05/11] drm_mm: extract check_free_mm_node Chris Wilson
2010-07-02 14:02 ` [PATCH 06/11] drm: implement helper functions for scanning lru list Chris Wilson
2010-07-02 14:02 ` [PATCH 07/11] drm/i915: prepare for fair lru eviction Chris Wilson
2010-07-02 14:45   ` [Intel-gfx] " Chris Wilson
2010-07-08 18:31   ` Eric Anholt
2010-07-08 20:11     ` [PATCH] drm/i915: prepare for fair lru eviction (v2) Chris Wilson
2010-07-02 14:02 ` [PATCH 08/11] drm/i915: Use a common seqno for all rings Chris Wilson
2010-07-02 14:02 ` [PATCH 09/11] drm/i915: Move the eviction logic to its own file Chris Wilson
2010-07-02 14:02 ` [PATCH 10/11] drm/i915: Implement fair lru eviction across both rings Chris Wilson
2010-07-02 14:02 ` [PATCH 11/11] drm/i915: Maintain LRU order of inactive objects upon access by CPU Chris Wilson
2010-07-06  7:13 ` Fair eviction for i915, based on Daniel's drm_mm scanner Eric Anholt
2010-07-07  2:53   ` Dave Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1278079341-3630-2-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.