thermal: Fix build warning of !defined(CONFIG_THERMAL_OF)
PATCH 1/2 thermal: Fix build warning of !defined(CONFIG_THERMAL_OF)
Add "inline" to thermal_zone_of_get_sensor_id() function to avoid below build warning of !defined(CONFIG_THERMAL_OF).
In file included from drivers/hwmon/hwmon.c:22:include/linux/thermal.h:382:12: warning: 'thermal_zone_of_get_sensor_id' defined but not used [-Wunused-function]
382 | static int thermal_zone_of_get_sensor_id(struct device_node *tz_np,
--- include/linux/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/thermal.h +1 -1
@@ -379,7 +379,7 @@ void devm_thermal_zone_of_sensor_unregister(struct device *dev, struct thermal_zone_device *tz);#else -static int thermal_zone_of_get_sensor_id (struct device_node *tz_np, +static inline int thermal_zone_of_get_sensor_id (struct device_node *tz_np,struct device_node *sensor_np,u32 *id) {
Signature · 1 line
2.7.4
PATCH 2/2 thermal: Remove COMPILE_TEST for IMX_SC_THERMAL
i.MX SCU thermal driver depends on IMX_SCU which does NOT have COMPILE_TEST enabled, so need to remove COMPILE_TEST for i.MX SCU thermal as well.
--- drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/Kconfig +1 -1
@@ -253,7 +253,7 @@ config IMX_THERMAL config IMX_SC_THERMAL tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller" - depends on IMX_SCU || COMPILE_TEST + depends on IMX_SCU depends on OF help Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with
Signature · 1 line
2.7.4
Re: [PATCH 2/2] thermal: Remove COMPILE_TEST for IMX_SC_THERMAL
Quoted 4 lines · Anson Huang
i.MX SCU thermal driver depends on
IMX_SCUwhich does NOT haveCOMPILE_TESTenabled, so need to removeCOMPILE_TESTfor i.MX SCU thermal as well.
Wouldn't a better solution be to add COMPILE_TEST to IMX_SCU to improve compile coverage?
Quoted 21 lines
Signed-off-by Anson Huang <[email protected]>--- drivers/thermal/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/thermal/Kconfig +1
-2@@ -253,7 +253,7 @@ config IMX_THERMAL config IMX_SC_THERMAL tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller" - depends on IMX_SCU || COMPILE_TEST + depends on IMX_SCU depends on OF help Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with --2.7.4
RE: [PATCH 2/2] thermal: Remove COMPILE_TEST for IMX_SC_THERMAL
Hi, Amit
Quoted 6 lines
Subject: Re: [PATCH 2/2] thermal: Remove
COMPILE_TESTforIMX_SC_THERMALQuoted 1 line · Anson Huang
Quoted 6 lines
Quoted 3 lines
i.MX SCU thermal driver depends on
IMX_SCUwhich does NOT haveCOMPILE_TESTenabled, so need to removeCOMPILE_TESTfor i.MX SCU thermal as well.Wouldn't a better solution be to add
COMPILE_TESTtoIMX_SCUto improve compile coverage?
It is a good idea, but I think since there are many i.MX8 modules driver also depend on IMX_SCU, It would be better to cut another patch set to enable COMPILE_TEST for IMX_SCU as well as all those modules that depend on it, then the compile coverage will cover all i.MX8 modules depend on IMX_SCU.
Thanks,
Anson
Daniel Lezcano
AppliedQuoted 10 lines · Anson Huang
Add "inline" to
thermal_zone_of_get_sensor_id()function to avoid below build warning of !defined(CONFIG_THERMAL_OF).In file included from
drivers/hwmon/hwmon.c:22:include/linux/thermal.h:382:12: warning: 'thermal_zone_of_get_sensor_id' defined but not used [-Wunused-function]
382 | static int thermal_zone_of_get_sensor_id(structdevice_node*tz_np,Signed-off-by Anson Huang <[email protected]>---
Applied, thanks
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog