From: Pierre Gondois <pierre.gondois@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Ionela.Voinescu@arm.com, Dietmar.Eggemann@arm.com,
Pierre Gondois <pierre.gondois@arm.com>,
Shaokun Zhang <zhangshaokun@hisilicon.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Pierre Gondois <Pierre.Gondois@arm.com>,
linux-pm@vger.kernel.org
Subject: [PATCH v1] cpufreq: CPPC: Fix unused-function warning
Date: Mon, 30 May 2022 10:12:36 +0200 [thread overview]
Message-ID: <20220530081236.40728-1-pierre.gondois@arm.com> (raw)
Building the cppc_cpufreq driver with for arm64 with
CONFIG_ENERGY_MODEL=n triggers the following warnings:
drivers/cpufreq/cppc_cpufreq.c:550:12: error: ‘cppc_get_cpu_cost’ defined but not used
[-Werror=unused-function]
550 | static int cppc_get_cpu_cost(struct device *cpu_dev, unsigned long KHz,
| ^~~~~~~~~~~~~~~~~
drivers/cpufreq/cppc_cpufreq.c:481:12: error: ‘cppc_get_cpu_power’ defined but not used
[-Werror=unused-function]
481 | static int cppc_get_cpu_power(struct device *cpu_dev,
| ^~~~~~~~~~~~~~~~~~
Fixes: 740fcdc2c20e ("cpufreq: CPPC: Register EM based on efficiency class information")
Reported-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
drivers/cpufreq/cppc_cpufreq.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index d092c9bb4ba3..ecd0d3ee48c5 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -478,7 +478,7 @@ static inline unsigned long compute_cost(int cpu, int step)
step * CPPC_EM_COST_STEP;
}
-static int cppc_get_cpu_power(struct device *cpu_dev,
+static __maybe_unused int cppc_get_cpu_power(struct device *cpu_dev,
unsigned long *power, unsigned long *KHz)
{
unsigned long perf_step, perf_prev, perf, perf_check;
@@ -547,8 +547,8 @@ static int cppc_get_cpu_power(struct device *cpu_dev,
return 0;
}
-static int cppc_get_cpu_cost(struct device *cpu_dev, unsigned long KHz,
- unsigned long *cost)
+static __maybe_unused int cppc_get_cpu_cost(struct device *cpu_dev,
+ unsigned long KHz, unsigned long *cost)
{
unsigned long perf_step, perf_prev;
struct cppc_perf_caps *perf_caps;
--
2.25.1
next reply other threads:[~2022-05-30 8:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 8:12 Pierre Gondois [this message]
2022-05-30 8:20 ` [PATCH v1] cpufreq: CPPC: Fix unused-function warning Viresh Kumar
2022-05-30 8:44 ` Pierre Gondois
2022-05-30 9:07 ` Viresh Kumar
2022-05-30 9:42 ` Pierre Gondois
2022-05-30 9:46 ` Viresh Kumar
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=20220530081236.40728-1-pierre.gondois@arm.com \
--to=pierre.gondois@arm.com \
--cc=Dietmar.Eggemann@arm.com \
--cc=Ionela.Voinescu@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=zhangshaokun@hisilicon.com \
/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