From: Masami Hiramatsu <mhiramat@kernel.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Shuah Khan <shuah@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 1/4] ftrace: Simplify glob handling in unregister_ftrace_function_probe_func()
Date: Wed, 17 May 2017 12:02:57 +0900 [thread overview]
Message-ID: <20170517120257.91dcdfe15e72b0e31b385b4c@kernel.org> (raw)
In-Reply-To: <5df74d4ffb4721db6d5a22fa08ca031d62ead493.1494956770.git.naveen.n.rao@linux.vnet.ibm.com>
On Tue, 16 May 2017 23:21:25 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
> Handle a NULL glob properly and simplify the check.
>
Looks good to me.
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Thanks!
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
> 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.12.2
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2017-05-17 3:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 17:51 [PATCH v2 0/4] ftrace: Fix a few issues Naveen N. Rao
2017-05-16 17:51 ` [PATCH v2 1/4] ftrace: Simplify glob handling in unregister_ftrace_function_probe_func() Naveen N. Rao
2017-05-17 3:02 ` Masami Hiramatsu [this message]
2017-05-16 17:51 ` [PATCH v2 2/4] ftrace/instances: Clear function triggers when removing instances Naveen N. Rao
2017-05-16 17:51 ` [PATCH v2 3/4] selftests/ftrace: Fix bashisms Naveen N. Rao
2017-05-16 17:51 ` [PATCH v2 4/4] selftests/ftrace: Add test to remove instance with active event triggers Naveen N. Rao
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=20170517120257.91dcdfe15e72b0e31b385b4c@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.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
all inboxes | Powered by JetHome®