Thread (22 messages) 22 messages, 9 authors, 5d ago

Re: [PATCH v3 5/7] kernel: Use mutable list iterators

From: Eduard Zingerman <eddyz87@gmail.com>
Date: 2026-06-22 19:03:54
Also in: bpf, cgroups, dri-devel, linux-crypto, linux-modules, linux-perf-users, linux-pm, live-patching, lkml, llvm, netdev, rcu, sched-ext

On Mon, 2026-06-22 at 12:28 +0800, Kaitao Cheng wrote:
From: Kaitao Cheng <redacted>

The safe list iteration helpers require callers to provide a temporary
cursor even when the cursor is only used internally by the loop. This
leaves many functions with otherwise unused variables whose only purpose
is to satisfy the old iterator interface.

Use the mutable list iteration helpers for those cases. The mutable
helpers keep the same removal-safe traversal semantics, while allowing
the temporary cursor to be internal to the macro when the caller does
not need to observe it.

Convert list, hlist and llist users under kernel/ where the temporary
cursor is not used outside the iteration. Keep the explicit cursor form
where the next entry is still needed by the surrounding code.

No functional change intended.

Signed-off-by: Kaitao Cheng <redacted>
---
Beside the fact that this does not apply,
I don't see a reason why is this needed for BPF sub-tree.

[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help