mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf hists browser: remove superfluous null check on map
@ 2016-08-15 16:25 Colin King
  2016-08-16 15:28 ` Namhyung Kim
  2016-08-24  9:24 ` [tip:perf/core] perf hists browser: Remove " tip-bot for Colin Ian King
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2016-08-15 16:25 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Namhyung Kim, Jiri Olsa, Pekka Enberg,
	Wang Nan
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

map is being already checked if it is null at the start of
do_zoom_dso, so the second subsequent check is superfluous
and can be removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 tools/perf/ui/browsers/hists.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 13d4143..8d72939 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2418,8 +2418,6 @@ do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
 		browser->hists->dso_filter = NULL;
 		ui_helpline__pop();
 	} else {
-		if (map == NULL)
-			return 0;
 		ui_helpline__fpush("To zoom out press ESC or ENTER + \"Zoom out of %s DSO\"",
 				   __map__is_kernel(map) ? "the Kernel" : map->dso->short_name);
 		browser->hists->dso_filter = map->dso;
-- 
2.8.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf hists browser: remove superfluous null check on map
  2016-08-15 16:25 [PATCH] perf hists browser: remove superfluous null check on map Colin King
@ 2016-08-16 15:28 ` Namhyung Kim
  2016-08-24  9:24 ` [tip:perf/core] perf hists browser: Remove " tip-bot for Colin Ian King
  1 sibling, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2016-08-16 15:28 UTC (permalink / raw)
  To: Colin King
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Pekka Enberg, Wang Nan,
	linux-kernel

On Mon, Aug 15, 2016 at 05:25:43PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> map is being already checked if it is null at the start of
> do_zoom_dso, so the second subsequent check is superfluous
> and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


> ---
>  tools/perf/ui/browsers/hists.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index 13d4143..8d72939 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -2418,8 +2418,6 @@ do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
>  		browser->hists->dso_filter = NULL;
>  		ui_helpline__pop();
>  	} else {
> -		if (map == NULL)
> -			return 0;
>  		ui_helpline__fpush("To zoom out press ESC or ENTER + \"Zoom out of %s DSO\"",
>  				   __map__is_kernel(map) ? "the Kernel" : map->dso->short_name);
>  		browser->hists->dso_filter = map->dso;
> -- 
> 2.8.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf hists browser: Remove superfluous null check on map
  2016-08-15 16:25 [PATCH] perf hists browser: remove superfluous null check on map Colin King
  2016-08-16 15:28 ` Namhyung Kim
@ 2016-08-24  9:24 ` tip-bot for Colin Ian King
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Colin Ian King @ 2016-08-24  9:24 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: jolsa, mingo, linux-kernel, alexander.shishkin, tglx, hpa,
	colin.king, penberg, wangnan0, acme, peterz, namhyung

Commit-ID:  6637e6f1ac62e62a353612844db21cff9a17758b
Gitweb:     http://git.kernel.org/tip/6637e6f1ac62e62a353612844db21cff9a17758b
Author:     Colin Ian King <colin.king@canonical.com>
AuthorDate: Mon, 15 Aug 2016 17:25:43 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 23 Aug 2016 15:37:33 -0300

perf hists browser: Remove superfluous null check on map

'map' is being already checked if it is NULL at the start of
do_zoom_dso(), so the second subsequent check is superfluous and can be
removed.

Signed-off-by: Colin King <colin.king@canonical.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1471278343-14999-1-git-send-email-colin.king@canonical.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/ui/browsers/hists.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 22e48a3..f0611c9 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -2440,8 +2440,6 @@ do_zoom_dso(struct hist_browser *browser, struct popup_action *act)
 		browser->hists->dso_filter = NULL;
 		ui_helpline__pop();
 	} else {
-		if (map == NULL)
-			return 0;
 		ui_helpline__fpush("To zoom out press ESC or ENTER + \"Zoom out of %s DSO\"",
 				   __map__is_kernel(map) ? "the Kernel" : map->dso->short_name);
 		browser->hists->dso_filter = map->dso;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-24  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 16:25 [PATCH] perf hists browser: remove superfluous null check on map Colin King
2016-08-16 15:28 ` Namhyung Kim
2016-08-24  9:24 ` [tip:perf/core] perf hists browser: Remove " tip-bot for Colin Ian King

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®