Re: [PATCH 1/3] tracing/ftrace: implement a set_flag callback fortracers

From: Frederic Weisbecker
Date: Mon Nov 17 2008 - 13:24:00 EST


Ingo Molnar a écrit :
> i've got some syntactic nits:
>

>
> magic constant '3' needs a comment at least.
>

>
> how about making a dummy empty trace_opts for all tracers (set by
> plugin init if the init function finds a NULL there) - that way the
> 'if (trace_opts)' can go away and you can just iterate away on that
> array of options.


> one tab too much. Also, the condition can be avoided by creating a
> dummy ->set_flag() that just returns 0.
>


>
> variable should be one line higher, to not break the upside down
> christmas tree layout. [ :-) ]
>

>
> please look at the file you modify and try to clone the micro-style it
> follows. For example in this file it would be more standard to use
> vertical alignment for structure definitions:
>

> ditto - here the new field deviates from he existing style.
>
> also note how the 'int set);' line is unnecessarily broken to a
> separate line - it could be in the same line where the set_flag field
> begins.
>

>
> spurious looking newline insertion.
>
> Ingo

Ok. That's fixed in the patch below. I hope I haven't missed something.
--