Skip to content

Commit c0d15cc

Browse files
Dave Jonestorvalds
authored andcommitted
linked-list: Remove __list_for_each
__list_for_each used to be the non prefetch() aware list walking primitive. When we removed the prefetch macros from the list routines, it became redundant. Given it does exactly the same thing as list_for_each now, we might as well remove it and call list_for_each directly. All users of __list_for_each have been converted to list_for_each calls in the current merge window. Signed-off-by: Dave Jones <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 16fc5bc commit c0d15cc

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

include/linux/list.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -380,17 +380,6 @@ static inline void list_splice_tail_init(struct list_head *list,
380380
#define list_for_each(pos, head) \
381381
for (pos = (head)->next; pos != (head); pos = pos->next)
382382

383-
/**
384-
* __list_for_each - iterate over a list
385-
* @pos: the &struct list_head to use as a loop cursor.
386-
* @head: the head for your list.
387-
*
388-
* This variant doesn't differ from list_for_each() any more.
389-
* We don't do prefetching in either case.
390-
*/
391-
#define __list_for_each(pos, head) \
392-
for (pos = (head)->next; pos != (head); pos = pos->next)
393-
394383
/**
395384
* list_for_each_prev - iterate over a list backwards
396385
* @pos: the &struct list_head to use as a loop cursor.

0 commit comments

Comments
 (0)