* [PATCH v1] platform: arm64: drop the vacuous THERMAL dependency from EC_ASUS_GLYMUR
@ 2026-10-29 2:12 Haiyue Wang
2026-10-29 8:08 ` Konrad Dybcio
0 siblings, 1 reply; 2+ messages in thread
From: Haiyue Wang @ 2026-10-29 2:12 UTC (permalink / raw)
To: platform-driver-x86
Cc: Haiyue Wang, Hans de Goede, Ilpo Järvinen,
Bryan O'Donoghue, Konrad Dybcio, open list
'depends on THERMAL || THERMAL=n' is always true and is semantically a
no-op, but it couples NEW_LEDS, which is selected here, to THERMAL and
closes a Kconfig dependency loop. The C tools stay silent because they
fold the always-true expression to 'y' before running dependency loop
detection; kconfiglib, used by the Yocto kernel config audit, does not
fold and rejects the config at parse time.
The loop is easy to expose with the in-tree tools, using the technique
from commit b33a654a5bd6 ("drm/tiny: Kconfig: Remove always-y THERMAL
dep. from TINYDRM_REPAPER"),
https://git.kernel.org/linus/b33a654a5bd6: temporarily make THERMAL
tristate so the folding stops, then any config target reports it:
$ sed -i 's/bool "Thermal drivers"/tristate "Thermal drivers"/' \
drivers/thermal/Kconfig
$ make allnoconfig
error: recursive dependency detected!
symbol POWER_SUPPLY is selected by HID_ASUS
symbol HID_ASUS depends on LEDS_CLASS
symbol LEDS_CLASS depends on NEW_LEDS
symbol NEW_LEDS is selected by EC_ASUS_GLYMUR
symbol EC_ASUS_GLYMUR depends on THERMAL
symbol THERMAL is selected by AB8500_BM
symbol AB8500_BM depends on POWER_SUPPLY
Drop the vacuous line to break the loop; the driver still builds both
with and without THERMAL.
Fixes: db3a9dddab5f ("platform: arm64: Add a driver for the EC found on ASUS Glymur machines")
Signed-off-by: Haiyue Wang <haiyuewa@163.com>
Assisted-by: LLM
---
drivers/platform/arm64/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/platform/arm64/Kconfig b/drivers/platform/arm64/Kconfig
index 2a84775a13a9..3f879410b311 100644
--- a/drivers/platform/arm64/Kconfig
+++ b/drivers/platform/arm64/Kconfig
@@ -40,7 +40,6 @@ config EC_ASUS_GLYMUR
depends on HWMON
depends on INPUT
depends on PM
- depends on THERMAL || THERMAL=n
select NEW_LEDS
select LEDS_CLASS
help
--
2.56.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] platform: arm64: drop the vacuous THERMAL dependency from EC_ASUS_GLYMUR
2026-10-29 2:12 [PATCH v1] platform: arm64: drop the vacuous THERMAL dependency from EC_ASUS_GLYMUR Haiyue Wang
@ 2026-10-29 8:08 ` Konrad Dybcio
0 siblings, 0 replies; 2+ messages in thread
From: Konrad Dybcio @ 2026-10-29 8:08 UTC (permalink / raw)
To: Haiyue Wang, platform-driver-x86
Cc: Hans de Goede, Ilpo Järvinen, Bryan O'Donoghue, open list
On 10/29/26 3:12 AM, Haiyue Wang wrote:
> 'depends on THERMAL || THERMAL=n' is always true and is semantically a
> no-op, but it couples NEW_LEDS, which is selected here, to THERMAL and
> closes a Kconfig dependency loop. The C tools stay silent because they
> fold the always-true expression to 'y' before running dependency loop
> detection; kconfiglib, used by the Yocto kernel config audit, does not
> fold and rejects the config at parse time.
>
> The loop is easy to expose with the in-tree tools, using the technique
> from commit b33a654a5bd6 ("drm/tiny: Kconfig: Remove always-y THERMAL
> dep. from TINYDRM_REPAPER"),
> https://git.kernel.org/linus/b33a654a5bd6: temporarily make THERMAL
> tristate so the folding stops, then any config target reports it:
>
> $ sed -i 's/bool "Thermal drivers"/tristate "Thermal drivers"/' \
> drivers/thermal/Kconfig
> $ make allnoconfig
> error: recursive dependency detected!
> symbol POWER_SUPPLY is selected by HID_ASUS
> symbol HID_ASUS depends on LEDS_CLASS
> symbol LEDS_CLASS depends on NEW_LEDS
> symbol NEW_LEDS is selected by EC_ASUS_GLYMUR
> symbol EC_ASUS_GLYMUR depends on THERMAL
> symbol THERMAL is selected by AB8500_BM
> symbol AB8500_BM depends on POWER_SUPPLY
>
> Drop the vacuous line to break the loop; the driver still builds both
> with and without THERMAL.
>
> Fixes: db3a9dddab5f ("platform: arm64: Add a driver for the EC found on ASUS Glymur machines")
> Signed-off-by: Haiyue Wang <haiyuewa@163.com>
> Assisted-by: LLM
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-29 8:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29 2:12 [PATCH v1] platform: arm64: drop the vacuous THERMAL dependency from EC_ASUS_GLYMUR Haiyue Wang
2026-10-29 8:08 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®