]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ARC: perf: Remove redundant initialization of variable idx
authorColin Ian King <colin.i.king@googlemail.com>
Fri, 26 Nov 2021 22:23:12 +0000 (22:23 +0000)
committerVineet Gupta <vineetg@rivosinc.com>
Wed, 29 Dec 2021 03:48:48 +0000 (19:48 -0800)
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>
arch/arc/kernel/perf_event.c

index 145722f80c9b74d796c1d4bf451a6e2f7a70d534..f5dd799ddb9e6d0d23ad406b8e3ddb40604aa738 100644 (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)