hwmon: (ltq-cputemp) depend on HWMON=y
PATCH 1/1 hwmon: (ltq-cputemp) depend on HWMON=y
The XWAY temperature driver is selected by a boolean option under HWMON. With HWMON=m the selected built-in object is not included by that directory descent.
Require HWMON=y for this platform driver. This avoids advertising an unbuilt sensor; it does not implement a loadable XWAY sensor.
The issue was found by our static-analysis tool and manually reviewed.
---
The original patch was prepared with Gemini. Codex assisted with this review and revision (Assisted-by: gpt 5).
Starting from the MIPS XWAY defconfig, the sensor resolved to y with HWMON=m before the change and to n afterwards. With HWMON=y it remained selectable. The CGU accessors use ltq_cgu_membase, which is not exported to modules. This was a Kconfig test using the kernel dummy cross tools; no target binary was built.
drivers/hwmon/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/Kconfig +1 -1
@@ -1238,7 +1238,7 @@ config SENSORS_LTC4283 config SENSORS_LTQ_CPUTEMP bool "Lantiq cpu temperature sensor driver" - depends on SOC_XWAY + depends on SOC_XWAY && HWMON=y help If you say yes here you get support for the temperature sensor inside your CPU.
base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 11 lines
The XWAY temperature driver is selected by a boolean option under HWMON. With HWMON=m the selected built-in object is not included by that directory descent.
Require HWMON=y for this platform driver. This avoids advertising an unbuilt sensor; it does not implement a loadable XWAY sensor.
The issue was found by our static-analysis tool and manually reviewed.
Fixes 7074d0a92758 ("hwmon: (ltq-cputemp) add cpu temp sensor driver")Signed-off-by Pengpeng Hou <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 11 lines · Pengpeng Hou
The XWAY temperature driver is selected by a boolean option under HWMON. With HWMON=m the selected built-in object is not included by that directory descent.
Require HWMON=y for this platform driver. This avoids advertising an unbuilt sensor; it does not implement a loadable XWAY sensor.
The issue was found by our static-analysis tool and manually reviewed.
Fixes 7074d0a92758 ("hwmon: (ltq-cputemp) add cpu temp sensor driver")Signed-off-by Pengpeng Hou <[email protected]>
Applied.
Thanks,
Guenter