public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: s3c64xx: hide unused variable
@ 2025-01-22  6:52 Arnd Bergmann
  2025-01-22  6:58 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-01-22  6:52 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Krzysztof Kozlowski
  Cc: Arnd Bergmann, Alim Akhtar, linux-pm, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

A previous compiler warning fix extended an #ifdef block, but that
led to another warning in some builds:

drivers/cpufreq/s3c64xx-cpufreq.c:27:28: error: 's3c64xx_dvfs_table' defined but not used [-Werror=unused-variable]
   27 | static struct s3c64xx_dvfs s3c64xx_dvfs_table[] = {

Add yet another #ifdef check around that variable.

Fixes: 76b218721e5f ("cpufreq: s3c64xx: Fix compilation warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I wonder if the driver should instead depend on CONFIG_REGULATOR
and drop the #ifdef checks.
---
 drivers/cpufreq/s3c64xx-cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index 8fc43a74cefb..9cef71528076 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -24,6 +24,7 @@ struct s3c64xx_dvfs {
 	unsigned int vddarm_max;
 };
 
+#ifdef CONFIG_REGULATOR
 static struct s3c64xx_dvfs s3c64xx_dvfs_table[] = {
 	[0] = { 1000000, 1150000 },
 	[1] = { 1050000, 1150000 },
@@ -31,6 +32,7 @@ static struct s3c64xx_dvfs s3c64xx_dvfs_table[] = {
 	[3] = { 1200000, 1350000 },
 	[4] = { 1300000, 1350000 },
 };
+#endif
 
 static struct cpufreq_frequency_table s3c64xx_freq_table[] = {
 	{ 0, 0,  66000 },
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-22  6:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-22  6:52 [PATCH] cpufreq: s3c64xx: hide unused variable Arnd Bergmann
2025-01-22  6:58 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox