Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755237AbbGZP4g (ORCPT ); Sun, 26 Jul 2015 11:56:36 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:34854 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755184AbbGZP4d (ORCPT ); Sun, 26 Jul 2015 11:56:33 -0400 From: Minfei Huang To: rostedt@goodmis.org, mingo@redhat.com Cc: linux-kernel@vger.kernel.org, mhuang@redhat.com, Minfei Huang Subject: [PATCH 2/2] ftrace: Make if condition correctly due to the operator order Date: Sun, 26 Jul 2015 23:55:52 +0800 Message-Id: <1437926152-12352-2-git-send-email-mnfhuang@gmail.com> X-Mailer: git-send-email 2.4.0 In-Reply-To: <1437926152-12352-1-git-send-email-mnfhuang@gmail.com> References: <1437926152-12352-1-git-send-email-mnfhuang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1090 Lines: 31 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/