mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] thermal: Fix build warning of !defined(CONFIG_THERMAL_OF)
@ 2020-03-03  8:04 Anson Huang
  2020-03-03  8:04 ` [PATCH 2/2] thermal: Remove COMPILE_TEST for IMX_SC_THERMAL Anson Huang
  2020-03-03  9:02 ` [PATCH 1/2] thermal: Fix build warning of !defined(CONFIG_THERMAL_OF) Daniel Lezcano
  0 siblings, 2 replies; 5+ messages in thread
From: Anson Huang @ 2020-03-03  8:04 UTC (permalink / raw)
  To: rui.zhang, daniel.lezcano, amit.kucheria, linux-pm, linux-kernel
  Cc: Linux-imx

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,

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 include/linux/thermal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 53e6f67..c91b1e3 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -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)
 {
-- 
2.7.4


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

end of thread, other threads:[~2020-03-03  9:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03  8:04 [PATCH 1/2] thermal: Fix build warning of !defined(CONFIG_THERMAL_OF) Anson Huang
2020-03-03  8:04 ` [PATCH 2/2] thermal: Remove COMPILE_TEST for IMX_SC_THERMAL Anson Huang
2020-03-03  9:14   ` Amit Kucheria
2020-03-03  9:19     ` Anson Huang
2020-03-03  9:02 ` [PATCH 1/2] thermal: Fix build warning of !defined(CONFIG_THERMAL_OF) Daniel Lezcano

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®