tracing/eprobe: Iterate trace_eprobe directly
authorChuang Wang <nashuiliang@gmail.com>
Tue, 22 Aug 2023 02:24:33 +0000 (10:24 +0800)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 23 Aug 2023 00:38:56 +0000 (09:38 +0900)
commitf8bbf8b9901a09915d7b466ceb2bccc1fb5abea8
treec6ac34f38e76abdef9e3e7bdddbfe0ba21f4c334
parent8865aea0471c512c2d94220c60a0083cefcb9348
tracing/eprobe: Iterate trace_eprobe directly

Refer to the description in [1], we can skip "container_of()" following
"list_for_each_entry()" by using "list_for_each_entry()" with
"struct trace_eprobe" and "tp.list".

Also, this patch defines "for_each_trace_eprobe_tp" to simplify the code
of the same logic.

[1] https://lore.kernel.org/all/CAHk-=wjakjw6-rDzDDBsuMoDCqd+9ogifR_EE1F0K-jYek1CdA@mail.gmail.com/

Link: https://lore.kernel.org/all/20230822022433.262478-1-nashuiliang@gmail.com/
Signed-off-by: Chuang Wang <nashuiliang@gmail.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/trace/trace_eprobe.c