Re: [GIT PULL] tracing: Updates for 5.2

From: Linus Torvalds
Date: Wed May 15 2019 - 19:35:47 EST


On Wed, May 15, 2019 at 4:29 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> One option is to just rewrite it something like
>
> const unsigned int offset = offsetof(struct trace_iterator, seq);
> memset(offset+(void *)&iter, 0, sizeof(iter) - offset);

Side note: make it a well-named helper function, since
"ftrace_dump_buf()" does this too in kernel/trace/trace_kdb.c, and
gets the exact same warning.

Linus