[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <163190683957.25758.3367474272186551096.tip-bot2@tip-bot2>
Date: Fri, 17 Sep 2021 19:27:19 -0000
From: "tip-bot2 for Tim Gardner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Tim Gardner <tim.gardner@...onical.com>,
Borislav Petkov <bp@...e.de>,
Giovanni Gherdovich <ggherdovich@...e.cz>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/cleanups] x86/smp: Remove unnecessary assignment to local
var freq_scale
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 85784470efa2d5733e86679ba05d310ece81b20f
Gitweb: https://git.kernel.org/tip/85784470efa2d5733e86679ba05d310ece81b20f
Author: Tim Gardner <tim.gardner@...onical.com>
AuthorDate: Fri, 10 Sep 2021 12:44:05 -06:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Fri, 17 Sep 2021 21:20:34 +02:00
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:
e2b0d619b400a ("x86, sched: check for counters overflow in frequency invariant accounting")
Remove the variable initializer.
Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Reviewed-by: Giovanni Gherdovich <ggherdovich@...e.cz>
Link: https://lkml.kernel.org/r/20210910184405.24422-1-tim.gardner@canonical.com
---
arch/x86/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 85f6e24..c453b82 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -2166,7 +2166,7 @@ DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE;
void arch_scale_freq_tick(void)
{
- u64 freq_scale = SCHED_CAPACITY_SCALE;
+ u64 freq_scale;
u64 aperf, mperf;
u64 acnt, mcnt;
Powered by blists - more mailing lists