Skip to contentSkip to conversation

perf/x86: remove unused variable 'cpu_type'

PATCH Applied Rafael Mendonca 2 participants 2 messages Oct 28, 2022 – Nov 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf/x86: remove unused variable 'cpu_type'

Since the removal of function x86_pmu_update_cpu_context() by commit 983bd8543b5a ("perf: Rewrite core context handling"), there is no need to query the type of the hybrid CPU inside function init_hw_perf_events().

Fixes 983bd8543b5a ("perf: Rewrite core context handling")
---
 arch/x86/events/core.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/events/core.c +0 -4
index 337a99afe8..85a63a41c4 100644
@@ -2161,13 +2161,9 @@ static int __init init_hw_perf_events(void)
 		if (err)
 			goto out2;
 	} else {
-		u8 cpu_type = get_this_hybrid_cpu_type();
 		struct x86_hybrid_pmu *hybrid_pmu;
 		int i, j;
 
-		if (!cpu_type && x86_pmu.get_hybrid_cpu_type)
-			cpu_type = x86_pmu.get_hybrid_cpu_type();
-
 		for (i = 0; i < x86_pmu.num_hybrid_pmus; i++) {
 			hybrid_pmu = &x86_pmu.hybrid_pmu[i];
 
Signature · 1 line
2.34.1
#1 lore raw

[tip: perf/core] perf/x86: Remove unused variable 'cpu_type'

The following commit has been merged into the perf/core branch of tip:

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     8e356858be2989355aafcc96af541fedf9fb486f
Gitweb:        https://git.kernel.org/tip/8e356858be2989355aafcc96af541fedf9fb486f
Author:        Rafael Mendonca <[email protected]>
AuthorDate:    Fri, 28 Oct 2022 17:30:05 -03:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Tue, 15 Nov 2022 22:30:11 +01:00

perf/x86: Remove unused variable 'cpu_type'

Since the removal of function x86_pmu_update_cpu_context() by commit 983bd8543b5a ("perf: Rewrite core context handling"), there is no need to query the type of the hybrid CPU inside function init_hw_perf_events().

Fixes 983bd8543b5a ("perf: Rewrite core context handling")
---
 arch/x86/events/core.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/events/core.c +0 -4
index 337a99a..85a63a4 100644
@@ -2161,13 +2161,9 @@ static int __init init_hw_perf_events(void)
 		if (err)
 			goto out2;
 	} else {
-		u8 cpu_type = get_this_hybrid_cpu_type();
 		struct x86_hybrid_pmu *hybrid_pmu;
 		int i, j;
 
-		if (!cpu_type && x86_pmu.get_hybrid_cpu_type)
-			cpu_type = x86_pmu.get_hybrid_cpu_type();
-
 		for (i = 0; i < x86_pmu.num_hybrid_pmus; i++) {
 			hybrid_pmu = &x86_pmu.hybrid_pmu[i];