]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
list: Remove duplicated and unused macro list_for_each_reverse
authorZijun Hu <quic_zijuhu@quicinc.com>
Tue, 17 Sep 2024 10:42:56 +0000 (18:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2024 06:21:09 +0000 (08:21 +0200)
Remove macro list_for_each_reverse due to below reasons:

- it is same as list_for_each_prev.
- it is not used by current kernel tree.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20240917-fix_list-v2-1-d2914665e89f@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/list.h

index 5f4b0a39cf46a3784a22e0319aa213551d7f4b2c..29a375889fb8fad3d999706f2f3a2ef51af2e6ab 100644 (file)
@@ -686,14 +686,6 @@ static inline void list_splice_tail_init(struct list_head *list,
 #define list_for_each(pos, head) \
        for (pos = (head)->next; !list_is_head(pos, (head)); pos = pos->next)
 
-/**
- * list_for_each_reverse - iterate backwards over a list
- * @pos:       the &struct list_head to use as a loop cursor.
- * @head:      the head for your list.
- */
-#define list_for_each_reverse(pos, head) \
-       for (pos = (head)->prev; pos != (head); pos = pos->prev)
-
 /**
  * list_for_each_rcu - Iterate over a list in an RCU-safe fashion
  * @pos:       the &struct list_head to use as a loop cursor.