aboutsummaryrefslogtreecommitdiff
path: root/include/linux/list.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-09 04:28:13 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-09 04:28:13 -0500
commit99b3738fbf17208ac474420fa6b7e4b0c0c2b9ed (patch)
tree6f977546112ccbd617ef40ae38a1ca558d71bce9 /include/linux/list.h
parent332b5a52f2f96bc2d13bbe594a430318c0ee4425 (diff)
parent8a19ac89edbe9b702c10fd2039b8cb2db4644a5f (diff)
Merge branch 'upstream'
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 945daa1f13d..47208bd99f9 100644
--- a/include/linux/list.h
+++ b/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)
{