X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fyaffs_list.h;h=a7afaea27b13b413007ca721efd9ab0a4eebc702;hp=624cd5f1007e345b51b93b60ab63177f2108b3c0;hb=d13e6146b4ccadd7aab2033b6cf9f4551d6abd71;hpb=5409719091c79983abc45bcc3070bce6786c8278 diff --git a/direct/yaffs_list.h b/direct/yaffs_list.h index 624cd5f..a7afaea 100644 --- a/direct/yaffs_list.h +++ b/direct/yaffs_list.h @@ -1,7 +1,7 @@ /* * YAFFS: Yet another Flash File System . A NAND-flash specific file system. * - * Copyright (C) 2002-2010 Aleph One Ltd. + * Copyright (C) 2002-2011 Aleph One Ltd. * for Toby Churchill Ltd and Brightstar Engineering * * Created by Charles Manning @@ -24,8 +24,6 @@ #define __YAFFS_LIST_H__ -#include "yportenv.h" - /* * This is a simple doubly linked list implementation that matches the * way the Linux kernel doubly linked list implementation works. @@ -52,7 +50,7 @@ do { \ /* Add an element to a list */ -static Y_INLINE void list_add(struct list_head *new_entry, +static inline void list_add(struct list_head *new_entry, struct list_head *list) { struct list_head *list_next = list->next; @@ -64,7 +62,7 @@ static Y_INLINE void list_add(struct list_head *new_entry, } -static Y_INLINE void list_add_tail(struct list_head *new_entry, +static inline void list_add_tail(struct list_head *new_entry, struct list_head *list) { struct list_head *list_prev = list->prev; @@ -79,7 +77,7 @@ static Y_INLINE void list_add_tail(struct list_head *new_entry, /* Take an element out of its current list, with or without * reinitialising the links.of the entry*/ -static Y_INLINE void list_del(struct list_head *entry) +static inline void list_del(struct list_head *entry) { struct list_head *list_next = entry->next; struct list_head *list_prev = entry->prev; @@ -89,7 +87,7 @@ static Y_INLINE void list_del(struct list_head *entry) } -static Y_INLINE void list_del_init(struct list_head *entry) +static inline void list_del_init(struct list_head *entry) { list_del(entry); entry->next = entry->prev = entry; @@ -97,7 +95,7 @@ static Y_INLINE void list_del_init(struct list_head *entry) /* Test if the list is empty */ -static Y_INLINE int list_empty(struct list_head *entry) +static inline int list_empty(struct list_head *entry) { return (entry->next == entry); } @@ -121,7 +119,8 @@ static Y_INLINE int list_empty(struct list_head *entry) #define list_for_each_safe(itervar, save_var, list) \ for (itervar = (list)->next, save_var = (list)->next->next; \ - itervar != (list); itervar = save_var, save_var = save_var->next) + itervar != (list); \ + itervar = save_var, save_var = save_var->next) #endif