Skip to contentSkip to conversation

hwmon: (ltq-cputemp) depend on HWMON=y

PATCH Applied Pengpeng Hou 3 participants 3 messages Dec 4 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

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.

Fixes 7074d0a92758 ("hwmon: (ltq-cputemp) add cpu temp sensor driver")

---
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
index 18c682e1a4756a35e1433493271ba65b65f7fbe8..9c4dacfc4125e406763c2f9d40e29c9f4f097e33 100644
@@ -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

#1 lore raw
Sashiko 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")

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to Pengpeng Hou
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")

Applied.

Thanks,
Guenter