Re: [PATCH 2/2] tracing/function: simplify for __ftrace_replace_code()

From: Li Zefan
Date: Fri Jul 17 2009 - 00:31:48 EST


>> + if (enable && !(rec->flags & FTRACE_FL_NOTRACE)) {
>> + if (ftrace_filtered) {
>> + if (rec->flags & FTRACE_FL_FILTER)
>> + flag = FTRACE_FL_ENABLED;
>> + } else
>> + flag = FTRACE_FL_ENABLED;
>
>
> The above can be factorized in
>
> if (!ftrace_filtered || rec->flags & FTRACE_FL_FILTER)
> flag = FTRACE_FL_ENABLED
>

I think it's better to put the latter condition into parentheses:

if (!ftrace_filtered || (rec->flags & FTRACE_FL_FILTER))
flag = FTRACE_FL_ENABLED

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/