WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] linux-2.6.18: add list_first_entry()

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux-2.6.18: add list_first_entry()
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Nov 2010 10:50:04 -0700
Delivery-date: Wed, 03 Nov 2010 10:50:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1288805674 0
# Node ID 09de232364470674de0d5a3d63e2c181eb0f62f8
# Parent  f14221afcebeac623197f7b68f6ff3262c58083f
linux-2.6.18: add list_first_entry()
... to address build failure after c/s 1045:bd2bf7a84686.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 include/linux/list.h |   11 +++++++++++
 1 files changed, 11 insertions(+)

diff -r f14221afcebe -r 09de23236447 include/linux/list.h
--- a/include/linux/list.h      Wed Nov 03 08:21:08 2010 +0000
+++ b/include/linux/list.h      Wed Nov 03 17:34:34 2010 +0000
@@ -352,6 +352,17 @@ static inline void list_splice_init(stru
  */
 #define list_entry(ptr, type, member) \
        container_of(ptr, type, member)
+
+/**
+ * list_first_entry - get the first element from a list
+ * @ptr:       the list head to take the element from.
+ * @type:      the type of the struct this is embedded in.
+ * @member:    the name of the list_struct within the struct.
+ *
+ * Note, that list is expected to be not empty.
+ */
+#define list_first_entry(ptr, type, member) \
+       list_entry((ptr)->next, type, member)
 
 /**
  * list_for_each       -       iterate over a list

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux-2.6.18: add list_first_entry(), Xen patchbot-linux-2.6.18-xen <=