From: Minfei Huang <mnfhuang@gmail.com>
To: rostedt@goodmis.org, mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, mhuang@redhat.com,
Minfei Huang <mnfhuang@gmail.com>
Subject: [PATCH 2/2] ftrace: Make if condition correctly due to the operator order
Date: Sun, 26 Jul 2015 23:55:52 +0800 [thread overview]
Message-ID: <1437926152-12352-2-git-send-email-mnfhuang@gmail.com> (raw)
In-Reply-To: <1437926152-12352-1-git-send-email-mnfhuang@gmail.com>
The if condition will be always true, since the operator & has the high
priority than operator ||.
Use () to quote them to make the if condition correctly.
Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
---
kernel/trace/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index c04dff9..d9acc6a 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -254,7 +254,7 @@ static ftrace_func_t ftrace_ops_get_list_func(struct ftrace_ops *ops)
* If this is a dynamic ops or we force list func,
* then it needs to call the list anyway.
*/
- if (ops->flags & FTRACE_OPS_FL_DYNAMIC || FTRACE_FORCE_LIST_FUNC)
+ if (ops->flags & (FTRACE_OPS_FL_DYNAMIC || FTRACE_FORCE_LIST_FUNC))
return ftrace_ops_list_func;
return ftrace_ops_get_func(ops);
--
2.4.0
next prev parent reply other threads:[~2015-07-26 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-26 15:55 [PATCH 1/2] ftrace: Remove the unused variant ftrace_update_time Minfei Huang
2015-07-26 15:55 ` Minfei Huang [this message]
2015-07-27 2:20 ` [PATCH 2/2] ftrace: Make if condition correctly due to the operator order yalin wang
2015-07-27 2:42 ` Minfei Huang
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=1437926152-12352-2-git-send-email-mnfhuang@gmail.com \
--to=mnfhuang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhuang@redhat.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome