Skip to contentSkip to conversation

perf: remove unused pointer task_ctx

PATCH Applied Colin Ian King 2 participants 2 messages Oct 28, 2022 – Nov 16, 2022

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

PATCH 1/1 perf: remove unused pointer task_ctx

The pointer task_ctx is being assigned a value that is not read, the assignment is redundant and so is the pointer. Remove it

---
 kernel/events/core.c | 2 --
 1 file changed, 2 deletions(-)
kernel/events/core.c +0 -2
index ebd9ebd53238..e7c0df152c8f 100644
@@ -4215,7 +4215,6 @@ static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc)
 	struct perf_cpu_context *cpuctx = this_cpu_ptr(&cpu_context);
 	struct perf_event_pmu_context *cpu_epc, *task_epc = NULL;
 	struct perf_event *cpu_event = NULL, *task_event = NULL;
-	struct perf_event_context *task_ctx = NULL;
 	int cpu_rotate, task_rotate;
 	struct pmu *pmu;
 
@@ -4229,7 +4228,6 @@ static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc)
 	task_epc = cpc->task_epc;
 
 	cpu_rotate = cpu_epc->rotate_necessary;
-	task_ctx = cpuctx->task_ctx;
 	task_rotate = task_epc ? task_epc->rotate_necessary : 0;
 
 	if (!(cpu_rotate || task_rotate))
Signature · 1 line
2.37.3
merge bot Applied
#1 lore raw

[tip: perf/core] perf: Remove unused pointer task_ctx

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:     3ce1cb7eee70335b6d4f50fadec264473e9566c3
Gitweb:        https://git.kernel.org/tip/3ce1cb7eee70335b6d4f50fadec264473e9566c3
Author:        Colin Ian King <[email protected]>
AuthorDate:    Fri, 28 Oct 2022 13:25:45 +01:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Tue, 15 Nov 2022 22:30:11 +01:00

perf: Remove unused pointer task_ctx

The pointer task_ctx is being assigned a value that is not read, the assignment is redundant and so is the pointer. Remove it

---
 kernel/events/core.c | 2 --
 1 file changed, 2 deletions(-)
kernel/events/core.c +0 -2
index ec2abc5..baa2997 100644
@@ -4215,7 +4215,6 @@ static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc)
 	struct perf_cpu_context *cpuctx = this_cpu_ptr(&perf_cpu_context);
 	struct perf_event_pmu_context *cpu_epc, *task_epc = NULL;
 	struct perf_event *cpu_event = NULL, *task_event = NULL;
-	struct perf_event_context *task_ctx = NULL;
 	int cpu_rotate, task_rotate;
 	struct pmu *pmu;
 
@@ -4229,7 +4228,6 @@ static bool perf_rotate_context(struct perf_cpu_pmu_context *cpc)
 	task_epc = cpc->task_epc;
 
 	cpu_rotate = cpu_epc->rotate_necessary;
-	task_ctx = cpuctx->task_ctx;
 	task_rotate = task_epc ? task_epc->rotate_necessary : 0;
 
 	if (!(cpu_rotate || task_rotate))