From: Li Zefan <lizf@cn.fujitsu.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] tracing/function: simplify for __ftrace_replace_code()
Date: Fri, 17 Jul 2009 12:30:07 +0800 [thread overview]
Message-ID: <4A5FFE4F.8050407@cn.fujitsu.com> (raw)
In-Reply-To: <20090717040528.GB4977@nowhere>
>> + 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
next prev parent reply other threads:[~2009-07-17 4:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 4:29 [PATCH 1/2] tracing/function: fix the return value of ftrace_trace_onoff_callback() Xiao Guangrong
2009-07-15 4:32 ` [PATCH 2/2] tracing/function: simplify for __ftrace_replace_code() Xiao Guangrong
2009-07-16 9:29 ` Li Zefan
2009-07-17 4:05 ` Frederic Weisbecker
2009-07-17 4:30 ` Li Zefan [this message]
2009-07-17 4:39 ` Frederic Weisbecker
2009-07-15 14:28 ` [PATCH 1/2] tracing/function: fix the return value of ftrace_trace_onoff_callback() Frederic Weisbecker
2009-07-16 9:29 ` Li Zefan
2009-07-17 3:35 ` Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A5FFE4F.8050407@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=xiaoguangrong@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.