linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: zhengbin <zhengbin13@huawei.com>
To: <benh@kernel.crashing.org>, <paulus@samba.org>,
	<mpe@ellerman.id.au>, <linuxppc-dev@lists.ozlabs.org>
Cc: zhengbin13@huawei.com
Subject: [PATCH 2/5] powerpc/perf: Remove set but not used variable 'target'
Date: Tue, 19 Nov 2019 14:14:31 +0800	[thread overview]
Message-ID: <1574144074-142032-3-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1574144074-142032-1-git-send-email-zhengbin13@huawei.com>

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@huawei.com>
Signed-off-by: zhengbin <zhengbin13@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


  parent reply	other threads:[~2019-11-19  7:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19  6:14 [PATCH 0/5] powerpc: Remove five unused variables zhengbin
2019-11-19  6:14 ` [PATCH 1/5] powerpc/fadump: Remove set but not used variable 'elf' zhengbin
2019-11-19  6:14 ` zhengbin [this message]
2019-11-19  6:14 ` [PATCH 3/5] powerpc/powernv: Remove set but not used variable 'total_vfs' zhengbin
2019-11-19  6:14 ` [PATCH 4/5] powerpc/powernv: Remove set but not used variable 'pdn' zhengbin
2019-11-19  6:14 ` [PATCH 5/5] powerpc/powernv: Remove set but not used variable 'parent' zhengbin
2020-09-09 13:37 ` [PATCH 0/5] powerpc: Remove five unused variables Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1574144074-142032-3-git-send-email-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).