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>
This commit is contained in:
Colin Ian King 2021-11-26 22:23:12 +00:00 committed by Vineet Gupta
parent 753150ada5
commit e296c2e1cd

View File

@ -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)