Subject: perf/power: Remove some simple hw.target usage From: Peter Zijlstra Date: Mon Jul 15 14:34:17 CEST 2019 Signed-off-by: Peter Zijlstra (Intel) --- arch/powerpc/perf/imc-pmu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) --- a/arch/powerpc/perf/imc-pmu.c +++ b/arch/powerpc/perf/imc-pmu.c @@ -888,7 +888,6 @@ static int thread_imc_cpu_init(void) static int thread_imc_event_init(struct perf_event *event, struct task_struct *task) { u32 config = event->attr.config; - struct task_struct *target; struct imc_pmu *pmu; if (event->attr.type != event->pmu->type) @@ -908,8 +907,7 @@ static int thread_imc_event_init(struct if (((config & IMC_EVENT_OFFSET_MASK) > pmu->counter_mem_size)) return -EINVAL; - target = event->hw.target; - if (!target) + if (!task) return -EINVAL; event->pmu->task_ctx_nr = perf_sw_context; @@ -1295,8 +1293,6 @@ static void trace_imc_event_del(struct p static int trace_imc_event_init(struct perf_event *event, struct task_struct *task) { - struct task_struct *target; - if (event->attr.type != event->pmu->type) return -ENOENT; @@ -1308,7 +1304,6 @@ static int trace_imc_event_init(struct p return -ENOENT; event->hw.idx = -1; - target = event->hw.target; event->pmu->task_ctx_nr = perf_hw_context; return 0;