From 2efb56b1ffb0d9a5d0f36bb7551cc825be32da52 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 3 Feb 2006 03:03:56 -0800 Subject: [PATCH] --- yaml --- r: 19625 b: refs/heads/master c: 490d6ab170c94a7a59870f528d765131b8963e79 h: refs/heads/master i: 19623: f639f4b9b9d4d805feb75cfa942e9a2bc7168095 v: v3 --- [refs] | 2 +- trunk/include/linux/list.h | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 6f9d9a73747b..c219a4f39dc4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bcc68b8616bcac47dbfc414398e382b3b10faf4c +refs/heads/master: 490d6ab170c94a7a59870f528d765131b8963e79 diff --git a/trunk/include/linux/list.h b/trunk/include/linux/list.h index 945daa1f13dd..47208bd99f9e 100644 --- a/trunk/include/linux/list.h +++ b/trunk/include/linux/list.h @@ -34,9 +34,11 @@ struct list_head { #define LIST_HEAD(name) \ struct list_head name = LIST_HEAD_INIT(name) -#define INIT_LIST_HEAD(ptr) do { \ - (ptr)->next = (ptr); (ptr)->prev = (ptr); \ -} while (0) +static inline void INIT_LIST_HEAD(struct list_head *list) +{ + list->next = list; + list->prev = list; +} /* * Insert a new entry between two known consecutive entries. @@ -534,7 +536,11 @@ struct hlist_node { #define HLIST_HEAD_INIT { .first = NULL } #define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) -#define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL) +static inline void INIT_HLIST_NODE(struct hlist_node *h) +{ + h->next = NULL; + h->pprev = NULL; +} static inline int hlist_unhashed(const struct hlist_node *h) {