diff options
Diffstat (limited to 'include/linux/list.h')
| -rw-r--r-- | include/linux/list.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index b4a939b6b625..08cf4f651889 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | #ifndef _LINUX_LIST_H | 1 | #ifndef _LINUX_LIST_H |
| 2 | #define _LINUX_LIST_H | 2 | #define _LINUX_LIST_H |
| 3 | 3 | ||
| 4 | #ifdef __KERNEL__ | ||
| 5 | |||
| 6 | #include <linux/stddef.h> | 4 | #include <linux/stddef.h> |
| 7 | #include <linux/poison.h> | 5 | #include <linux/poison.h> |
| 8 | #include <linux/prefetch.h> | 6 | #include <linux/prefetch.h> |
| @@ -328,7 +326,7 @@ static inline int list_is_singular(const struct list_head *head) | |||
| 328 | return !list_empty(head) && (head->next == head->prev); | 326 | return !list_empty(head) && (head->next == head->prev); |
| 329 | } | 327 | } |
| 330 | 328 | ||
| 331 | static inline void __list_splice(struct list_head *list, | 329 | static inline void __list_splice(const struct list_head *list, |
| 332 | struct list_head *head) | 330 | struct list_head *head) |
| 333 | { | 331 | { |
| 334 | struct list_head *first = list->next; | 332 | struct list_head *first = list->next; |
| @@ -347,7 +345,8 @@ static inline void __list_splice(struct list_head *list, | |||
| 347 | * @list: the new list to add. | 345 | * @list: the new list to add. |
| 348 | * @head: the place to add it in the first list. | 346 | * @head: the place to add it in the first list. |
| 349 | */ | 347 | */ |
| 350 | static inline void list_splice(struct list_head *list, struct list_head *head) | 348 | static inline void list_splice(const struct list_head *list, |
| 349 | struct list_head *head) | ||
| 351 | { | 350 | { |
| 352 | if (!list_empty(list)) | 351 | if (!list_empty(list)) |
| 353 | __list_splice(list, head); | 352 | __list_splice(list, head); |
| @@ -982,7 +981,4 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
| 982 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ | 981 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ |
| 983 | pos = rcu_dereference(pos->next)) | 982 | pos = rcu_dereference(pos->next)) |
| 984 | 983 | ||
| 985 | #else | ||
| 986 | #warning "don't include kernel headers in userspace" | ||
| 987 | #endif /* __KERNEL__ */ | ||
| 988 | #endif | 984 | #endif |
