mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 14:34:28 +08:00
cpufreq: ACPI: Remove unused variables 'acpi_cpufreq_online' and 'ret'
Clang warns:
drivers/cpufreq/acpi-cpufreq.c:970:24: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
acpi_cpufreq_online = ret;
^~~
drivers/cpufreq/acpi-cpufreq.c:960:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 error generated.
Both ret and acpi_cpufreq_online are now unused so they can be safely
removed, clearing up the warning.
Fixes: 13fdbc8b8d
("cpufreq: ACPI: Defer setting boost MSRs")
Link: https://github.com/ClangBuiltLinux/linux/issues/1757
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
21cdb6c18f
commit
cab75e1c8e
@ -953,12 +953,8 @@ static struct cpufreq_driver acpi_cpufreq_driver = {
|
|||||||
.attr = acpi_cpufreq_attr,
|
.attr = acpi_cpufreq_attr,
|
||||||
};
|
};
|
||||||
|
|
||||||
static enum cpuhp_state acpi_cpufreq_online;
|
|
||||||
|
|
||||||
static void __init acpi_cpufreq_boost_init(void)
|
static void __init acpi_cpufreq_boost_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
|
if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
|
||||||
pr_debug("Boost capabilities not present in the processor\n");
|
pr_debug("Boost capabilities not present in the processor\n");
|
||||||
return;
|
return;
|
||||||
@ -966,8 +962,6 @@ static void __init acpi_cpufreq_boost_init(void)
|
|||||||
|
|
||||||
acpi_cpufreq_driver.set_boost = set_boost;
|
acpi_cpufreq_driver.set_boost = set_boost;
|
||||||
acpi_cpufreq_driver.boost_enabled = boost_state(0);
|
acpi_cpufreq_driver.boost_enabled = boost_state(0);
|
||||||
|
|
||||||
acpi_cpufreq_online = ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init acpi_cpufreq_init(void)
|
static int __init acpi_cpufreq_init(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user