Skip to content

Commit e296c2e

Browse files
Colin Ian KingVineet Gupta
authored andcommitted
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 <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 753150a commit e296c2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arc/kernel/perf_event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static int arc_pmu_add(struct perf_event *event, int flags)
361361
{
362362
struct arc_pmu_cpu *pmu_cpu = this_cpu_ptr(&arc_pmu_cpu);
363363
struct hw_perf_event *hwc = &event->hw;
364-
int idx = hwc->idx;
364+
int idx;
365365

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

0 commit comments

Comments
 (0)