Commit e296c2e1 authored by Colin Ian King's avatar Colin Ian King Committed by Vineet Gupta
Browse files

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: default avatarVladimir Isaev <isaev@synopsys.com>
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarVineet Gupta <vineetg@rivosinc.com>
parent 753150ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -361,7 +361,7 @@ static int arc_pmu_add(struct perf_event *event, int flags)
{
	struct arc_pmu_cpu *pmu_cpu = this_cpu_ptr(&arc_pmu_cpu);
	struct hw_perf_event *hwc = &event->hw;
	int idx = hwc->idx;
	int idx;

	idx = ffz(pmu_cpu->used_mask[0]);
	if (idx == arc_pmu->n_counters)