mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/events: remove set but not used variable 'hwc'
@ 2022-05-06  6:04 Jiapeng Chong
  0 siblings, 0 replies; only message in thread
From: Jiapeng Chong @ 2022-05-06  6:04 UTC (permalink / raw)
  To: peterz
  Cc: mingo, acme, mark.rutland, alexander.shishkin, jolsa, namhyung,
	tglx, bp, dave.hansen, x86, hpa, linux-perf-users, linux-kernel,
	Jiapeng Chong, Abaci Robot

Eliminate the follow clang warning:

arch/x86/events/amd/core.c:774:24: warning: variable 'hwc' set but not
used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 arch/x86/events/amd/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c
index 47ef8aee15d2..78076904daad 100644
--- a/arch/x86/events/amd/core.c
+++ b/arch/x86/events/amd/core.c
@@ -771,13 +771,11 @@ static void amd_pmu_enable_event(struct perf_event *event)
 static void amd_pmu_enable_all(int added)
 {
 	struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
-	struct hw_perf_event *hwc;
 	int idx;
 
 	amd_brs_enable_all();
 
 	for (idx = 0; idx < x86_pmu.num_counters; idx++) {
-		hwc = &cpuc->events[idx]->hw;
 
 		/* only activate events which are marked as active */
 		if (!test_bit(idx, cpuc->active_mask))
-- 
2.20.1.7.g153144c


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-06  6:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06  6:04 [PATCH] x86/events: remove set but not used variable 'hwc' Jiapeng Chong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®