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


Groups > linux.kernel > #1462974 > unrolled thread

[PATCH] perf hists browser: remove superfluous null check on map

Started byColin King <colin.king@canonical.com>
First post2016-08-15 18:30 +0200
Last post2016-08-24 11:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] perf hists browser: remove superfluous null check on map Colin King <colin.king@canonical.com> - 2016-08-15 18:30 +0200
    Re: [PATCH] perf hists browser: remove superfluous null check on map Namhyung Kim <namhyung@kernel.org> - 2016-08-16 17:40 +0200
    [tip:perf/core] perf hists browser: Remove superfluous null check  on map tip-bot for Colin Ian King <tipbot@zytor.com> - 2016-08-24 11:30 +0200

#1462974 — [PATCH] perf hists browser: remove superfluous null check on map

FromColin King <colin.king@canonical.com>
Date2016-08-15 18:30 +0200
Subject[PATCH] perf hists browser: remove superfluous null check on map
Message-ID<s6sVY-7S0-25@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1463899

FromNamhyung Kim <namhyung@kernel.org>
Date2016-08-16 17:40 +0200
Message-ID<s6OD8-4QG-19@gated-at.bofh.it>
In reply to#1462974
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
> 

[toc] | [prev] | [next] | [standalone]


#1469257 — [tip:perf/core] perf hists browser: Remove superfluous null check on map

Fromtip-bot for Colin Ian King <tipbot@zytor.com>
Date2016-08-24 11:30 +0200
Subject[tip:perf/core] perf hists browser: Remove superfluous null check on map
Message-ID<s9CFs-gj-9@gated-at.bofh.it>
In reply to#1462974
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;

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web