diff options
author | Xiu Jianfeng <xiujianfeng@huawei.com> | 2021-12-10 02:22:45 +0100 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-12-11 15:34:32 +0100 |
commit | dba879672258699223b0ce61f9e5c079b0476d92 (patch) | |
tree | cbeb06385a245c194cf6983e9b65b35eac61efb9 /kernel | |
parent | tracing: Do not let synth_events block other dyn_event systems during create (diff) | |
download | linux-dba879672258699223b0ce61f9e5c079b0476d92.tar.xz linux-dba879672258699223b0ce61f9e5c079b0476d92.zip |
tracing: Use memset_startat helper in trace_iterator_reset()
Make use of memset_startat helper to simplify the code, there should be
no functional change as a result of this patch.
Link: https://lkml.kernel.org/r/20211210012245.207489-1-xiujianfeng@huawei.com
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 8bd1a815ce90..64a7ec44a635 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -1932,14 +1932,7 @@ extern struct trace_iterator *tracepoint_print_iter; */ static __always_inline void trace_iterator_reset(struct trace_iterator *iter) { - const size_t offset = offsetof(struct trace_iterator, seq); - - /* - * Keep gcc from complaining about overwriting more than just one - * member in the structure. - */ - memset((char *)iter + offset, 0, sizeof(struct trace_iterator) - offset); - + memset_startat(iter, 0, seq); iter->pos = -1; } |