Remove usage of list iterator after the loop body

From: Jakob Koschel
Date: Sat Apr 02 2022 - 06:29:42 EST


In preparation to limit the scope of a list iterator to the list
traversal loop, use a dedicated pointer as the iterator [1].

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@xxxxxxxxxxxxxx/

v1->v2:
- fix reverse x-mas tree (Steven Rostedt)
- rename subject line (Steven Rostedt)
- add additional tracing patches to bundle them all up in one go

Jakob Koschel (4):
tracing: Remove usage of list iterator after the loop body
tracing: Remove usage of list iterator variable after the loop
tracing: Replace usage of found with dedicated list iterator variable
tracing: Remove check of list iterator against head past the loop body

kernel/trace/ftrace.c | 20 ++++++++++++--------
kernel/trace/trace_eprobe.c | 14 ++++++++------
kernel/trace/trace_events.c | 29 ++++++++++++++---------------
kernel/trace/trace_events_hist.c | 17 ++++++++---------
kernel/trace/trace_events_trigger.c | 28 +++++++++++++---------------
kernel/trace/trace_output.c | 13 +++++++++----
6 files changed, 64 insertions(+), 57 deletions(-)


base-commit: 7a3ecddc571cc3294e5d6bb5948ff2b0cfa12735
--
2.25.1