@@ -294,6 +294,18 @@ static inline void list_splice_tail_init(struct list_head *list,
pos = list_entry(pos->member.next, typeof(*pos), member))
/**
+ * list_for_some_entry - iterate list of given interval
+ * @pos: the type * to use as a loop counter.
+ * @from: the begin node of the iteration.
+ * @to: the end node of the iteration.
+ * @member: the name of the list_struct within the struct.
+ */
+#define list_for_some_entry(pos, from, to, member) \
+ for (pos = list_entry((from)->next, typeof(*pos), member); \
+ &pos->member != (to); \
+ pos = list_entry(pos->member.next, typeof(*pos), member))
+
+/**
* list_for_each_entry_reverse - iterate backwards over list of given type.
* @pos: the type * to use as a loop counter.
* @head: the head for your list.
@@ -305,6 +317,18 @@ static inline void list_splice_tail_init(struct list_head *list,
pos = list_entry(pos->member.prev, typeof(*pos), member))
/**
+ * list_for_some_entry_reverse - iterate backwards list of given interval
+ * @pos: the type * to use as a loop counter.
+ * @from: the begin node of the iteration.
+ * @to: the end node of the iteration.
+ * @member: the name of the list_struct within the struct.
+ */
+#define list_for_some_entry_reverse(pos, from, to, member) \
+ for (pos = list_entry((from)->prev, typeof(*pos), member); \
+ &pos->member != (to); \
+ pos = list_entry(pos->member.prev, typeof(*pos), member))
+
+/**
* list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
* @pos: the type * to use as a loop counter.
* @n: another type * to use as temporary storage