Skip to content

Commit 8578447

Browse files
rtg-canonicalsuryasaimadhu
authored andcommitted
x86/smp: Remove unnecessary assignment to local var freq_scale
Coverity warns of an unused value in arch_scale_freq_tick(): CID 100778 (#1 of 1): Unused value (UNUSED_VALUE) assigned_value: Assigning value 1024ULL to freq_scale here, but that stored value is overwritten before it can be used. It was introduced by commit: e2b0d61 ("x86, sched: check for counters overflow in frequency invariant accounting") Remove the variable initializer. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Giovanni Gherdovich <ggherdovich@suse.cz> Link: https://lkml.kernel.org/r/20210910184405.24422-1-tim.gardner@canonical.com
1 parent 6880fa6 commit 8578447

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kernel/smpboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2166,7 +2166,7 @@ DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE;
21662166

21672167
void arch_scale_freq_tick(void)
21682168
{
2169-
u64 freq_scale = SCHED_CAPACITY_SCALE;
2169+
u64 freq_scale;
21702170
u64 aperf, mperf;
21712171
u64 acnt, mcnt;
21722172

0 commit comments

Comments
 (0)