Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1565341

Re: [PATCH 1/4] perf probe: Delete an unnecessary check in try_to_find_absolute_address()

From Masami Hiramatsu <mhiramat@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] perf probe: Delete an unnecessary check in try_to_find_absolute_address()
Date 2017-01-23 23:50 +0100
Message-ID <t2VAZ-43P-9@gated-at.bofh.it> (permalink)
References <t2OJc-885-21@gated-at.bofh.it> <t2OJd-885-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] perf probe: Delete an unnecessary check in  try_to_find_absolute_address() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-01-23 16:30 +0100
  Re: [PATCH 1/4] perf probe: Delete an unnecessary check in  try_to_find_absolute_address() Masami Hiramatsu <mhiramat@kernel.org> - 2017-01-23 23:50 +0100
  [tip:perf/core] perf probe: Delete an unnecessary check in  try_to_find_absolute_address() tip-bot for Markus Elfring <tipbot@zytor.com> - 2017-01-26 16:40 +0100

csiph-web