[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181215010936.ac9ae50716be12c332f30d58@kernel.org>
Date: Sat, 15 Dec 2018 01:09:36 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Tom Zanussi <zanussi@...nel.org>
Cc: rostedt@...dmis.org, tglx@...utronix.de, mhiramat@...nel.org,
namhyung@...nel.org, vedang.patel@...el.com, bigeasy@...utronix.de,
joel@...lfernandes.org, mathieu.desnoyers@...icios.com,
julia@...com, linux-kernel@...r.kernel.org,
linux-rt-users@...r.kernel.org
Subject: Re: [PATCH v8 10/22] tracing: Add hist trigger onchange() handler
Hi Tom,
Just a nitpick.
On Mon, 10 Dec 2018 18:01:24 -0600
Tom Zanussi <zanussi@...nel.org> wrote:
> enum action_id {
> @@ -1961,7 +1962,8 @@ static int parse_action(char *str, struct hist_trigger_attrs *attrs)
> return ret;
>
> if ((strncmp(str, "onmatch(", strlen("onmatch(")) == 0) ||
> - (strncmp(str, "onmax(", strlen("onmax(")) == 0)) {
> + (strncmp(str, "onmax(", strlen("onmax(")) == 0) ||
> + (strncmp(str, "onchange(", strlen("onchange(")) == 0)) {
You can use sizeof() instead of strlen() for static string.
[...]
> @@ -4740,6 +4767,15 @@ static int parse_actions(struct hist_trigger_data *hist_data)
> ret = PTR_ERR(data);
> break;
> }
> + } else if (strncmp(str, "onchange(", strlen("onchange(")) == 0) {
> + char *action_str = str + strlen("onchange(");
Ditto.
Thank you,
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists