include/linux/list.h | 8 -------- 1 file changed, 8 deletions(-)
From: Zijun Hu <quic_zijuhu@quicinc.com>
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.
Fixes: 8bf0cdfac7f8 ("<linux/list.h>: Introduce the list_for_each_reverse() method")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
include/linux/list.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/include/linux/list.h b/include/linux/list.h
index 5f4b0a39cf46..29a375889fb8 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -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.
---
base-commit: 6a36d828bdef0e02b1e6c12e2160f5b83be6aab5
change-id: 20240916-fix_list-553c447bde0f
Best regards,
--
Zijun Hu <quic_zijuhu@quicinc.com>
On Tue, Sep 17, 2024 at 03:28:18PM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@quicinc.com>
>
> 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.
>
> Fixes: 8bf0cdfac7f8 ("<linux/list.h>: Introduce the list_for_each_reverse() method")
Why is this a "Fix:"?
> Cc: stable@vger.kernel.org
Why is this for stable? What does this fix? Just removing code that no
one uses doesn't need to be backported, it's just dead, delete it.
thanks,
greg k-h
On 2024/9/17 15:49, Greg Kroah-Hartman wrote:
> On Tue, Sep 17, 2024 at 03:28:18PM +0800, Zijun Hu wrote:
>> From: Zijun Hu <quic_zijuhu@quicinc.com>
>>
>> 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.
>>
>> Fixes: 8bf0cdfac7f8 ("<linux/list.h>: Introduce the list_for_each_reverse() method")
>
> Why is this a "Fix:"?
>
thank you for code review.
Will remove fix tag for next revision and manually loop author of fixes
tag commit.
>> Cc: stable@vger.kernel.org
>
will remove Cc tag for next revision as well. (^^)
> Why is this for stable? What does this fix? Just removing code that no
> one uses doesn't need to be backported, it's just dead, delete it.
>
> thanks,
>
> greg k-h
© 2016 - 2026 Red Hat, Inc.