[PATCH 2/5] powerpc/perf: Remove set but not used variable 'target'

zhengbin zhengbin13 at huawei.com
Tue Nov 19 17:14:31 AEDT 2019


Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/perf/imc-pmu.c: In function trace_imc_event_init:
arch/powerpc/perf/imc-pmu.c:1292:22: warning: variable target set but not used [-Wunused-but-set-variable]

It is introduced by commit 012ae244845f ("powerpc/perf:
Trace imc PMU functions"), but never used, so remove it.

Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: zhengbin <zhengbin13 at huawei.com>
---
 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 cb50a9e..83f0908 100644
--- a/arch/powerpc/perf/imc-pmu.c
+++ b/arch/powerpc/perf/imc-pmu.c
@@ -1302,8 +1302,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;

@@ -1315,7 +1313,6 @@ static int trace_imc_event_init(struct perf_event *event)
 		return -ENOENT;

 	event->hw.idx = -1;
-	target = event->hw.target;

 	event->pmu->task_ctx_nr = perf_hw_context;
 	return 0;
--
2.7.4



More information about the Linuxppc-dev mailing list