1 #include <linux/compiler.h>
2 #include <linux/kernel.h>
3 #include <linux/types.h>
5 #include "../../../include/linux/list.h"
10 * list_del_range - deletes range of entries from list.
11 * @begin: first element in the range to delete from the list.
12 * @end: last element in the range to delete from the list.
13 * Note: list_empty on the range of entries does not return true after this,
14 * the entries is in an undefined state.
16 static inline void list_del_range(struct list_head *begin,
17 struct list_head *end)
19 begin->prev->next = end->next;
20 end->next->prev = begin->prev;
24 * list_for_each_from - iterate over a list from one of its nodes
25 * @pos: the &struct list_head to use as a loop cursor, from where to start
26 * @head: the head for your list.
28 #define list_for_each_from(pos, head) \
29 for (; pos != (head); pos = pos->next)