list_for_each_entry_reverse(9)
β¨ list_for_each_entry_reverse(9) β¨
okay so bestie, welcome to the Kernel API Manual, page list_for_each_entry_reverse(9). this one's a lil macro with big main character energy π
πΈ NAME πΈ
list_for_each_entry_reverse β iterate backwards over list of given type.
like, you're going through your list but in reverse, bestie. back it up, back it up π
π¦ SYNOPSIS π¦
list_for_each_entry_reverse (pos , head , member );
that's the whole vibe. three things in, and the macro does the rest β¨
π ARGUMENTS π
posβ thetype *to use as a loop cursor. it's your lil main character pointer that walks the loop for you π«Άheadβ the head for your list. the starting point, the home base, the head of the whole operation πmemberβ the name of thelist_headwithin the struct. like, that's the field inside your struct that's doing the linking π§
π₯ SEE ALSO π₯
Kernel file ./tools/include/linux/list.h β and honestly the whole friend group shows up here, no cap:
list_add(9)list_add_tail(9)list_replace(9)list_del_init(9)list_move(9)list_move_tail(9)list_is_first(9)list_is_last(9)list_empty(9)list_empty_careful(9)list_rotate_left(9)list_is_singular(9)list_cut_position(9)list_splice(9)list_splice_tail(9)list_splice_init(9)list_splice_tail_init(9)list_entry(9)list_first_entry(9)list_last_entry(9)list_first_entry_or_null(9)list_last_entry_or_null(9)list_next_entry(9)list_prev_entry(9)list_for_each(9)list_for_each_prev(9)list_for_each_safe(9)list_for_each_prev_safe(9)list_for_each_entry(9)list_prepare_entry(9)list_for_each_entry_continue(9)list_for_each_entry_continue_reverse(9)list_for_each_entry_from(9)list_for_each_entry_safe(9)list_for_each_entry_safe_continue(9)list_for_each_entry_safe_from(9)list_for_each_entry_safe_reverse(9)list_safe_reset_next(9)hlist_for_each_entry(9)hlist_for_each_entry_continue(9)hlist_for_each_entry_from(9)hlist_for_each_entry_safe(9)list_del_range(9)list_for_each_from(9)
like, that's the entire group chat right there β iconic π
that's the page, bestie!! π remember: ./tools/include/linux, October 2026, and the whole thing is literally called list_for_each_entry_reverse(9). slay, go iterate backwards ππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms