From: Nathan Chancellor <nathan@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: Stuart Hayes <stuart.w.hayes@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH] cpufreq: ACPI: Remove unused variables 'acpi_cpufreq_online' and 'ret'
Date: Tue, 8 Nov 2022 10:01:03 -0700 [thread overview]
Message-ID: <20221108170103.3375832-1-nathan@kernel.org> (raw)
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: 13fdbc8b8da6 ("cpufreq: ACPI: Defer setting boost MSRs")
Link: https://github.com/ClangBuiltLinux/linux/issues/1757
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
drivers/cpufreq/acpi-cpufreq.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index c8fdfcf659e6..74ef0e05ff7b 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -953,12 +953,8 @@ static struct cpufreq_driver acpi_cpufreq_driver = {
.attr = acpi_cpufreq_attr,
};
-static enum cpuhp_state acpi_cpufreq_online;
-
static void __init acpi_cpufreq_boost_init(void)
{
- int ret;
-
if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
pr_debug("Boost capabilities not present in the processor\n");
return;
@@ -966,8 +962,6 @@ static void __init acpi_cpufreq_boost_init(void)
acpi_cpufreq_driver.set_boost = set_boost;
acpi_cpufreq_driver.boost_enabled = boost_state(0);
-
- acpi_cpufreq_online = ret;
}
static int __init acpi_cpufreq_init(void)
base-commit: 21cdb6c18f85fe538ca8740bc79f11fbe08d0197
--
2.38.1
next reply other threads:[~2022-11-08 17:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 17:01 Nathan Chancellor [this message]
2022-11-10 22:05 ` [PATCH] cpufreq: ACPI: Remove unused variables 'acpi_cpufreq_online' and 'ret' Nick Desaulniers
2022-11-16 19:34 ` Nathan Chancellor
2022-11-16 19:50 ` Rafael J. Wysocki
2022-11-16 19:58 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221108170103.3375832-1-nathan@kernel.org \
--to=nathan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=ndesaulniers@google.com \
--cc=rafael@kernel.org \
--cc=stuart.w.hayes@gmail.com \
--cc=trix@redhat.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox