public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Subject: [for-next][PATCH 3/8] ftrace: Simplify glob handling in unregister_ftrace_function_probe_func()
Date: Thu, 18 May 2017 20:43:16 -0400	[thread overview]
Message-ID: <20170519004412.588380356@goodmis.org> (raw)
In-Reply-To: 20170519004313.407366856@goodmis.org

[-- Attachment #1: 0003-ftrace-Simplify-glob-handling-in-unregister_ftrace_f.patch --]
[-- Type: text/plain, Size: 1024 bytes --]

From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>

Handle a NULL glob properly and simplify the check.

Link: http://lkml.kernel.org/r/5df74d4ffb4721db6d5a22fa08ca031d62ead493.1494956770.git.naveen.n.rao@linux.vnet.ibm.com

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel/trace/ftrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 39dca4e86a94..c35c3e67d09a 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4144,9 +4144,9 @@ unregister_ftrace_function_probe_func(char *glob, struct trace_array *tr,
 	int i, ret = -ENODEV;
 	int size;
 
-	if (glob && (strcmp(glob, "*") == 0 || !strlen(glob)))
+	if (!glob || !strlen(glob) || !strcmp(glob, "*"))
 		func_g.search = NULL;
-	else if (glob) {
+	else {
 		int not;
 
 		func_g.type = filter_parse_regex(glob, strlen(glob),
-- 
2.10.2

  parent reply	other threads:[~2017-05-19  0:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19  0:43 [for-next][PATCH 0/8] tracing/ftrace: Updates for 4.12-rc1 Steven Rostedt
2017-05-19  0:43 ` [for-next][PATCH 1/8] tracing: Move postpone selftests to core from early_initcall Steven Rostedt
2017-05-19  0:43 ` [for-next][PATCH 2/8] tracing/kprobes: Enforce kprobes teardown after testing Steven Rostedt
2017-05-19  0:43 ` Steven Rostedt [this message]
2017-05-19  0:43 ` [for-next][PATCH 4/8] ftrace/instances: Clear function triggers when removing instances Steven Rostedt
2017-05-19  0:43 ` [for-next][PATCH 5/8] ftrace: Remove #ifdef from code and add clear_ftrace_function_probes() stub Steven Rostedt
2017-05-19  0:43 ` [for-next][PATCH 6/8] selftests/ftrace: Fix bashisms Steven Rostedt
2017-05-19  0:43 ` [for-next][PATCH 7/8] selftests/ftrace: Add test to remove instance with active event triggers Steven Rostedt
2017-05-19  0:43 ` [for-next][PATCH 8/8] kprobes: Document how optimized kprobes are removed from module unload Steven Rostedt

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=20170519004412.588380356@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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