From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752707AbdFTJFP (ORCPT ); Tue, 20 Jun 2017 05:05:15 -0400 Received: from terminus.zytor.com ([65.50.211.136]:36129 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472AbdFTJFM (ORCPT ); Tue, 20 Jun 2017 05:05:12 -0400 Date: Tue, 20 Jun 2017 02:01:35 -0700 From: tip-bot for Kim Phillips Message-ID: Cc: kim.phillips@arm.com, mathieu.poirier@linaro.org, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, alexander.shishkin@linux.intel.com, acme@redhat.com Reply-To: acme@redhat.com, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@kernel.org, hpa@zytor.com, mathieu.poirier@linaro.org, tglx@linutronix.de, kim.phillips@arm.com In-Reply-To: <20170615125521.80cc128dc856bc1f2e61b730@arm.com> References: <20170615125521.80cc128dc856bc1f2e61b730@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf coresight: Remove superfluous check before use Git-Commit-ID: 0c788d4726c916544490c17cdbfd1ae2a6347fa8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0c788d4726c916544490c17cdbfd1ae2a6347fa8 Gitweb: http://git.kernel.org/tip/0c788d4726c916544490c17cdbfd1ae2a6347fa8 Author: Kim Phillips AuthorDate: Thu, 15 Jun 2017 12:55:21 -0500 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 15:27:08 -0300 perf coresight: Remove superfluous check before use The cs_etm_evsel variable is guaranteed to be set at this point in cs_etm_recording_options(). Signed-off-by: Kim Phillips Acked-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170615125521.80cc128dc856bc1f2e61b730@arm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/arm/util/cs-etm.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c index 02a649b..7ce3d1a 100644 --- a/tools/perf/arch/arm/util/cs-etm.c +++ b/tools/perf/arch/arm/util/cs-etm.c @@ -203,19 +203,18 @@ static int cs_etm_recording_options(struct auxtrace_record *itr, pr_debug2("%s snapshot size: %zu\n", CORESIGHT_ETM_PMU_NAME, opts->auxtrace_snapshot_size); - if (cs_etm_evsel) { - /* - * To obtain the auxtrace buffer file descriptor, the auxtrace - * event must come first. - */ - perf_evlist__to_front(evlist, cs_etm_evsel); - /* - * In the case of per-cpu mmaps, we need the CPU on the - * AUX event. - */ - if (!cpu_map__empty(cpus)) - perf_evsel__set_sample_bit(cs_etm_evsel, CPU); - } + /* + * To obtain the auxtrace buffer file descriptor, the auxtrace + * event must come first. + */ + perf_evlist__to_front(evlist, cs_etm_evsel); + + /* + * In the case of per-cpu mmaps, we need the CPU on the + * AUX event. + */ + if (!cpu_map__empty(cpus)) + perf_evsel__set_sample_bit(cs_etm_evsel, CPU); /* Add dummy event to keep tracking */ if (opts->full_auxtrace) {