public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	He Kuang <hekuang@huawei.com>, Ingo Molnar <mingo@redhat.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Milian Wolff <milian.wolff@kdab.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
	Wang Nan <wangnan0@huawei.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/4] perf probe: Delete an unnecessary check in try_to_find_absolute_address()
Date: Mon, 23 Jan 2017 22:48:09 +0000	[thread overview]
Message-ID: <20170124074809.abaea0687a22933344af0926@kernel.org> (raw)
In-Reply-To: <a3f2473b-6383-a326-bce0-b826423608b8@users.sourceforge.net>

On Mon, 23 Jan 2017 16:22:22 +0100
SF Markus Elfring <elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 23 Jan 2017 14:54:26 +0100
> 
> Remove a condition check which is unnecessary at the end
> because this source code place should usually only be reached
> with a non-zero pointer.

Looks good to me :)

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!

> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  tools/perf/util/probe-event.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index d281ae2b54e8..6c7508337fe8 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -2966,10 +2966,8 @@ static int try_to_find_absolute_address(struct perf_probe_event *pev,
>  	return 1;
>  
>  errout:
> -	if (*tevs) {
> -		clear_probe_trace_events(*tevs, 1);
> -		*tevs = NULL;
> -	}
> +	clear_probe_trace_events(*tevs, 1);
> +	*tevs = NULL;
>  	return err;
>  }
>  
> -- 
> 2.11.0
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2017-01-23 22:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 15:20 [PATCH 0/4] perf: Fine-tuning for three function implementations SF Markus Elfring
2017-01-23 15:22 ` [PATCH 1/4] perf probe: Delete an unnecessary check in try_to_find_absolute_address() SF Markus Elfring
2017-01-23 22:48   ` Masami Hiramatsu [this message]
2017-01-23 15:24 ` [PATCH 2/4] perf probe: Delete an unnecessary assignment " SF Markus Elfring
2017-01-23 22:47   ` Masami Hiramatsu
2017-01-23 15:25 ` [PATCH 3/4] perf session: Move an error code assignment in __perf_session__set_tracepoints_handlers( SF Markus Elfring
2017-01-23 22:56   ` [PATCH 3/4] perf session: Move an error code assignment in __perf_session__set_tracepoints_handl Masami Hiramatsu
2017-01-23 15:26 ` [PATCH 4/4] perf strlist: Move an error code assignment in strlist__parse_list_entry() SF Markus Elfring
2017-01-23 23:32   ` Masami Hiramatsu

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=20170124074809.abaea0687a22933344af0926@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=elfring@users.sourceforge.net \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milian.wolff@kdab.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    --cc=wangnan0@huawei.com \
    /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