diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-03-11 15:34:32 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2022-03-13 21:36:27 +0000 |
commit | 5e24eea15c44e5663a47c36632c15eafd3afad39 (patch) | |
tree | 396d67760a8f6f6208496e383e3f26081e757d24 /include/osmocom/core | |
parent | 7ec19de720873defc3a1f02cc57638e351ab264e (diff) |
Cosmetic: linuxlist.h: fix misleading comment
Whenever iterating over a list and removing entries,
llist_for_each_entry_safe must be used instead of llist_for_each_entry.
The comment with "non-consecutive(!)" entries sounds like this is not
needed as long as one is iterating over the list consecutively. I guess
that might have worked with prefetch logic, however the prefetch
function is just a stub in linuxlist.h. (Also prefetch has been removed
from list.h in linux.git e66eed651fd18a961f11cda62f3b5286c8cc4f9f.)
Change-Id: I217e6871afe121edba26e4c6fd1a461e397c9e72
Diffstat (limited to 'include/osmocom/core')
-rw-r--r-- | include/osmocom/core/linuxlist.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index 725c60ca..2fc3fa75 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -328,8 +328,7 @@ static inline void llist_splice_init(struct llist_head *llist, pos = llist_entry(pos->member.next, typeof(*pos), member), \ prefetch(pos->member.next)) -/*! Iterate over llist of given type, safe against removal of - * non-consecutive(!) llist entries. +/*! Iterate over llist of given type, safe against removal of llist entry. * \param pos the 'type *' to use as a loop counter. * \param n another 'type *' to use as temporary storage. * \param head the head of the list over which to iterate. |