Messages in this thread |  | | Date | Fri, 17 Jul 2009 00:39:23 -0400 | From | Frederic Weisbecker <> | Subject | Re: [PATCH 2/2] tracing/function: simplify for __ftrace_replace_code() |
| |
On Fri, Jul 17, 2009 at 12:30:07PM +0800, Li Zefan wrote: > >> + 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 >
Ok. Done.
|  |