Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1277391 > unrolled thread

[PATCH] drm/mm: use list_next_entry

Started byGeliang Tang <geliangtang@163.com>
First post2015-11-25 14:30 +0100
Last post2015-11-25 16:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/mm: use list_next_entry Geliang Tang <geliangtang@163.com> - 2015-11-25 14:30 +0100
    Re: [PATCH] drm/mm: use list_next_entry Daniel Vetter <daniel@ffwll.ch> - 2015-11-25 16:30 +0100

#1277391 — [PATCH] drm/mm: use list_next_entry

FromGeliang Tang <geliangtang@163.com>
Date2015-11-25 14:30 +0100
Subject[PATCH] drm/mm: use list_next_entry
Message-ID<qyIj0-6Qa-13@gated-at.bofh.it>
To make the intention clearer, use list_next_entry instead of list_entry.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 include/drm/drm_mm.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index a58cc6c..fc65118 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -148,8 +148,7 @@ static inline u64 drm_mm_hole_node_start(struct drm_mm_node *hole_node)
 
 static inline u64 __drm_mm_hole_node_end(struct drm_mm_node *hole_node)
 {
-	return list_entry(hole_node->node_list.next,
-			  struct drm_mm_node, node_list)->start;
+	return list_next_entry(hole_node, node_list)->start;
 }
 
 /**
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1277478

FromDaniel Vetter <daniel@ffwll.ch>
Date2015-11-25 16:30 +0100
Message-ID<qyKb7-83T-13@gated-at.bofh.it>
In reply to#1277391
On Wed, Nov 25, 2015 at 09:23:07PM +0800, Geliang Tang wrote:
> To make the intention clearer, use list_next_entry instead of list_entry.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Applied to drm-misc, thanks.
-Daniel

> ---
>  include/drm/drm_mm.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
> index a58cc6c..fc65118 100644
> --- a/include/drm/drm_mm.h
> +++ b/include/drm/drm_mm.h
> @@ -148,8 +148,7 @@ static inline u64 drm_mm_hole_node_start(struct drm_mm_node *hole_node)
>  
>  static inline u64 __drm_mm_hole_node_end(struct drm_mm_node *hole_node)
>  {
> -	return list_entry(hole_node->node_list.next,
> -			  struct drm_mm_node, node_list)->start;
> +	return list_next_entry(hole_node, node_list)->start;
>  }
>  
>  /**
> -- 
> 2.5.0
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web