Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARC: perf: Remove redundant initialization of variable idx

The variable idx is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Reviewed-by: Vladimir Isaev <isaev@synopsys.com>
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>

authored by

Colin Ian King and committed by
Vineet Gupta
e296c2e1 753150ad

+1 -1
+1 -1
arch/arc/kernel/perf_event.c
··· 361 361 { 362 362 struct arc_pmu_cpu *pmu_cpu = this_cpu_ptr(&arc_pmu_cpu); 363 363 struct hw_perf_event *hwc = &event->hw; 364 - int idx = hwc->idx; 364 + int idx; 365 365 366 366 idx = ffz(pmu_cpu->used_mask[0]); 367 367 if (idx == arc_pmu->n_counters)