[PATCH 6/7] powerpc/perf: Fix W=1 compile warning
Cédric Le Goater
clg at kaod.org
Fri Sep 11 07:02:49 AEST 2020
CC arch/powerpc/perf/imc-pmu.o
../arch/powerpc/perf/imc-pmu.c: In function ‘trace_imc_event_init’:
../arch/powerpc/perf/imc-pmu.c:1429:22: error: variable ‘target’ set but not used [-Werror=unused-but-set-variable]
struct task_struct *target;
^~~~~~
Cc: Anju T Sudhakar <anju at linux.vnet.ibm.com>
Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
arch/powerpc/perf/imc-pmu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c
index 62d0b54086f8..9ed4fcccf8a9 100644
--- a/arch/powerpc/perf/imc-pmu.c
+++ b/arch/powerpc/perf/imc-pmu.c
@@ -1426,8 +1426,6 @@ static void trace_imc_event_del(struct perf_event *event, int flags)
static int trace_imc_event_init(struct perf_event *event)
{
- struct task_struct *target;
-
if (event->attr.type != event->pmu->type)
return -ENOENT;
@@ -1458,7 +1456,6 @@ static int trace_imc_event_init(struct perf_event *event)
mutex_unlock(&imc_global_refc.lock);
event->hw.idx = -1;
- target = event->hw.target;
event->pmu->task_ctx_nr = perf_hw_context;
event->destroy = reset_global_refc;
--
2.25.4
More information about the Linuxppc-dev
mailing list