Re: [GIT PULL] tracing: Updates for 5.2

From: Steven Rostedt
Date: Wed May 15 2019 - 21:48:40 EST


On Wed, 15 May 2019 16:31:34 -0700
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> 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

Good point, as they just cut and pasted some of this code.

I like the helper function, as it means I don't need to add the sub
part, as the function would be more contained.

> gets the exact same warning.
>

I can do this, but it needs testing and all that before sending to you,
and may not make the merge window. Is that fine?

-- Steve