Commit dba87967 authored by Xiu Jianfeng's avatar Xiu Jianfeng Committed by Steven Rostedt (VMware)

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.comSigned-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 4f67cca7
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment