* [PATCH] cpufreq: airoha: add CONFIG_OF dependency
@ 2025-01-22 6:55 Arnd Bergmann
2025-01-22 7:00 ` Viresh Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2025-01-22 6:55 UTC (permalink / raw)
To: Rafael J. Wysocki, Viresh Kumar, Christian Marangi
Cc: Arnd Bergmann, Pierre Gondois, linux-pm, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Compile-testing without CONFIG_OF leads to a harmless build warning:
drivers/cpufreq/airoha-cpufreq.c:109:34: error: 'airoha_cpufreq_match_list' defined but not used [-Werror=unused-const-variable=]
109 | static const struct of_device_id airoha_cpufreq_match_list[] __initconst = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
It would be possible to mark the variable as __maybe_unused to shut up
that warning, but a Kconfig dependency seems more appropriate as this still
allows build testing in allmodconfig and randconfig builds on all
architectures.
Fixes: 84cf9e541ccc ("cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/cpufreq/Kconfig.arm | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 704e84d00639..9e46960f6a86 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -18,6 +18,7 @@ config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM
config ARM_AIROHA_SOC_CPUFREQ
tristate "Airoha EN7581 SoC CPUFreq support"
depends on ARCH_AIROHA || COMPILE_TEST
+ depends on OF
select PM_OPP
default ARCH_AIROHA
help
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] cpufreq: airoha: add CONFIG_OF dependency 2025-01-22 6:55 [PATCH] cpufreq: airoha: add CONFIG_OF dependency Arnd Bergmann @ 2025-01-22 7:00 ` Viresh Kumar 2025-02-03 8:04 ` Arnd Bergmann 0 siblings, 1 reply; 5+ messages in thread From: Viresh Kumar @ 2025-01-22 7:00 UTC (permalink / raw) To: Arnd Bergmann Cc: Rafael J. Wysocki, Christian Marangi, Arnd Bergmann, Pierre Gondois, linux-pm, linux-kernel On 22-01-25, 07:55, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Compile-testing without CONFIG_OF leads to a harmless build warning: > > drivers/cpufreq/airoha-cpufreq.c:109:34: error: 'airoha_cpufreq_match_list' defined but not used [-Werror=unused-const-variable=] > 109 | static const struct of_device_id airoha_cpufreq_match_list[] __initconst = { > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > > It would be possible to mark the variable as __maybe_unused to shut up > that warning, but a Kconfig dependency seems more appropriate as this still > allows build testing in allmodconfig and randconfig builds on all > architectures. > > Fixes: 84cf9e541ccc ("cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/cpufreq/Kconfig.arm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > index 704e84d00639..9e46960f6a86 100644 > --- a/drivers/cpufreq/Kconfig.arm > +++ b/drivers/cpufreq/Kconfig.arm > @@ -18,6 +18,7 @@ config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM > config ARM_AIROHA_SOC_CPUFREQ > tristate "Airoha EN7581 SoC CPUFreq support" > depends on ARCH_AIROHA || COMPILE_TEST > + depends on OF > select PM_OPP > default ARCH_AIROHA > help Applied. Thanks. -- viresh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: airoha: add CONFIG_OF dependency 2025-01-22 7:00 ` Viresh Kumar @ 2025-02-03 8:04 ` Arnd Bergmann 2025-02-03 9:21 ` Viresh Kumar 0 siblings, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2025-02-03 8:04 UTC (permalink / raw) To: Viresh Kumar, Arnd Bergmann Cc: Rafael J . Wysocki, Christian Marangi, Pierre Gondois, linux-pm, linux-kernel On Wed, Jan 22, 2025, at 08:00, Viresh Kumar wrote: >> >> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm >> index 704e84d00639..9e46960f6a86 100644 >> --- a/drivers/cpufreq/Kconfig.arm >> +++ b/drivers/cpufreq/Kconfig.arm >> @@ -18,6 +18,7 @@ config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM >> config ARM_AIROHA_SOC_CPUFREQ >> tristate "Airoha EN7581 SoC CPUFreq support" >> depends on ARCH_AIROHA || COMPILE_TEST >> + depends on OF >> select PM_OPP >> default ARCH_AIROHA >> help > > Applied. Thanks. > It appears that something went wrong when you applied the fix, the version that is in your tree now makes no sense: --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -17,7 +17,7 @@ config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM config ARM_AIROHA_SOC_CPUFREQ tristate "Airoha EN7581 SoC CPUFreq support" - depends on ARCH_AIROHA || COMPILE_TEST + depends on (ARCH_AIROHA && OF) || COMPILE_TEST select PM_OPP default ARCH_AIROHA help ARCH_AIROHA requires CONFIG_OF, so this change does nothing, and the dependency is still missing for the COMPILE_TEST case. Arnd ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: airoha: add CONFIG_OF dependency 2025-02-03 8:04 ` Arnd Bergmann @ 2025-02-03 9:21 ` Viresh Kumar 2025-02-03 10:54 ` Arnd Bergmann 0 siblings, 1 reply; 5+ messages in thread From: Viresh Kumar @ 2025-02-03 9:21 UTC (permalink / raw) To: Arnd Bergmann Cc: Arnd Bergmann, Rafael J . Wysocki, Christian Marangi, Pierre Gondois, linux-pm, linux-kernel On 03-02-25, 09:04, Arnd Bergmann wrote: > On Wed, Jan 22, 2025, at 08:00, Viresh Kumar wrote: > >> > >> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > >> index 704e84d00639..9e46960f6a86 100644 > >> --- a/drivers/cpufreq/Kconfig.arm > >> +++ b/drivers/cpufreq/Kconfig.arm > >> @@ -18,6 +18,7 @@ config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM > >> config ARM_AIROHA_SOC_CPUFREQ > >> tristate "Airoha EN7581 SoC CPUFreq support" > >> depends on ARCH_AIROHA || COMPILE_TEST > >> + depends on OF > >> select PM_OPP > >> default ARCH_AIROHA > >> help > > > > Applied. Thanks. > > > > It appears that something went wrong when you applied the fix, > the version that is in your tree now makes no sense: Not just that, I actually fixed the problem by myself and so the commit doesn't have your credentials. I somehow managed to do two stupid things: - Lost your original commit, which I have surely applied as I replied to you earlier (and I reply only after I apply a patch). - Reinvented the wheel, that too incorrectly /facepalm . > --- a/drivers/cpufreq/Kconfig.arm > +++ b/drivers/cpufreq/Kconfig.arm > @@ -17,7 +17,7 @@ config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM > > config ARM_AIROHA_SOC_CPUFREQ > tristate "Airoha EN7581 SoC CPUFreq support" > - depends on ARCH_AIROHA || COMPILE_TEST > + depends on (ARCH_AIROHA && OF) || COMPILE_TEST > select PM_OPP > default ARCH_AIROHA > help > > ARCH_AIROHA requires CONFIG_OF, so this change does nothing, > and the dependency is still missing for the COMPILE_TEST case. Going to send this patch now, lemme know if it looks okay: commit 9d51d2710061dfa7f2568287c6ed125b858b7318 (HEAD -> cpufreq/arm/linux-next) Author: Arnd Bergmann <arnd@arndb.de> Date: Wed Jan 22 07:55:01 2025 +0100 cpufreq: airoha: modify CONFIG_OF dependency Compile-testing without CONFIG_OF leads to a harmless build warning: drivers/cpufreq/airoha-cpufreq.c:109:34: error: 'airoha_cpufreq_match_list' defined but not used [-Werror=unused-const-variable=] 109 | static const struct of_device_id airoha_cpufreq_match_list[] __initconst = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ It would be possible to mark the variable as __maybe_unused to shut up that warning, but a Kconfig dependency seems more appropriate as this still allows build testing in allmodconfig and randconfig builds on all architectures. An earlier commit, b865a8404642 ("cpufreq: airoha: Depends on OF"), tried to fix it incorrectly. ARCH_AIROHA already requires CONFIG_OF, so this change does nothing, and the dependency is still missing for the COMPILE_TEST case. Fix it properly. Fixes: 84cf9e541ccc ("cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver") Fixes: b865a8404642 ("cpufreq: airoha: Depends on OF") Signed-off-by: Arnd Bergmann <arnd@arndb.de> [ Viresh: updated commit log and fixed rebase conflict ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/Kconfig.arm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index 0ee5c691fb36..9e46960f6a86 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -17,7 +17,8 @@ config ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM config ARM_AIROHA_SOC_CPUFREQ tristate "Airoha EN7581 SoC CPUFreq support" - depends on (ARCH_AIROHA && OF) || COMPILE_TEST + depends on ARCH_AIROHA || COMPILE_TEST + depends on OF select PM_OPP default ARCH_AIROHA help -- viresh ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: airoha: add CONFIG_OF dependency 2025-02-03 9:21 ` Viresh Kumar @ 2025-02-03 10:54 ` Arnd Bergmann 0 siblings, 0 replies; 5+ messages in thread From: Arnd Bergmann @ 2025-02-03 10:54 UTC (permalink / raw) To: Viresh Kumar Cc: Arnd Bergmann, Rafael J . Wysocki, Christian Marangi, Pierre Gondois, linux-pm, linux-kernel On Mon, Feb 3, 2025, at 10:21, Viresh Kumar wrote: > > Going to send this patch now, lemme know if it looks okay: > > > It would be possible to mark the variable as __maybe_unused to shut up > that warning, but a Kconfig dependency seems more appropriate as this still > allows build testing in allmodconfig and randconfig builds on all > architectures. > > An earlier commit, b865a8404642 ("cpufreq: airoha: Depends on OF"), > tried to fix it incorrectly. ARCH_AIROHA already requires CONFIG_OF, so > this change does nothing, and the dependency is still missing for the > COMPILE_TEST case. > > Fix it properly. > > Fixes: 84cf9e541ccc ("cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver") > Fixes: b865a8404642 ("cpufreq: airoha: Depends on OF") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > [ Viresh: updated commit log and fixed rebase conflict ] > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Looks good to me, thanks! Arnd ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-03 10:54 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-01-22 6:55 [PATCH] cpufreq: airoha: add CONFIG_OF dependency Arnd Bergmann 2025-01-22 7:00 ` Viresh Kumar 2025-02-03 8:04 ` Arnd Bergmann 2025-02-03 9:21 ` Viresh Kumar 2025-02-03 10:54 ` Arnd Bergmann
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.