mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwmon: (ltq-cputemp) depend on HWMON=y
@ 2026-12-04  1:54 Pengpeng Hou
  2026-12-04  5:33 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-12-04  1:54 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, 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 <hppiscas@163.com>
---
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(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 18c682e1a4756a35e1433493271ba65b65f7fbe8..9c4dacfc4125e406763c2f9d40e29c9f4f097e33 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -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


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

* Re: [PATCH] hwmon: (ltq-cputemp) depend on HWMON=y
  2026-12-04  1:54 [PATCH] hwmon: (ltq-cputemp) depend on HWMON=y Pengpeng Hou
@ 2026-12-04  5:33 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2026-12-04  5:33 UTC (permalink / raw)
  To: Pengpeng Hou; +Cc: linux-hwmon, linux-kernel

On Fri, Dec 04, 2026 at 09:54:41AM +0800, Pengpeng Hou wrote:
> 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 <hppiscas@163.com>

Applied.

Thanks,
Guenter

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

end of thread, other threads:[~2026-12-04  5:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-04  1:54 [PATCH] hwmon: (ltq-cputemp) depend on HWMON=y Pengpeng Hou
2026-12-04  5:33 ` Guenter Roeck

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®