Thread (1 message) 1 message, 1 author, 2020-07-02

Re: [PATCH 1/2] perf tools: ARM SPE code cleanup

From: Mathieu Poirier <mathieu.poirier@linaro.org>
Date: 2020-07-02 22:39:55
Also in: lkml

On Tue, Jun 23, 2020 at 08:31:40PM +0800, Wei Li wrote:
quoted hunk
Remove the useless check code to make it clear.

Signed-off-by: Wei Li <redacted>
---
 tools/perf/arch/arm/util/auxtrace.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c
index 0a6e75b8777a..62b7b03d691a 100644
--- a/tools/perf/arch/arm/util/auxtrace.c
+++ b/tools/perf/arch/arm/util/auxtrace.c
@@ -57,7 +57,7 @@ struct auxtrace_record
 	struct evsel *evsel;
 	bool found_etm = false;
 	bool found_spe = false;
-	static struct perf_pmu **arm_spe_pmus = NULL;
+	static struct perf_pmu **arm_spe_pmus;
 	static int nr_spes = 0;
 	int i = 0;
 
@@ -65,9 +65,7 @@ struct auxtrace_record
 		return NULL;
 
 	cs_etm_pmu = perf_pmu__find(CORESIGHT_ETM_PMU_NAME);
-
-	if (!arm_spe_pmus)
-		arm_spe_pmus = find_all_arm_spe_pmus(&nr_spes, err);
+	arm_spe_pmus = find_all_arm_spe_pmus(&nr_spes, err);
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
 
 	evlist__for_each_entry(evlist, evsel) {
 		if (cs_etm_pmu &&
-- 
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help