Skip to contentSkip to conversation

thermal: core: Make thermal_cdev_set_cur_state() static

PATCH New Wei Yongjun 1 participant 1 message Jul 6, 2020 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: core: Make thermal_cdev_set_cur_state() static

sparse report build warning as follows:

drivers/thermal/thermal_helpers.c:178:6: warning:
symbol 'thermal_cdev_set_cur_state' was not declared. Should it be static?

Since function thermal_cdev_set_cur_state() is not used out of thermal_helpers.c, so marks it static.

---
 drivers/thermal/thermal_helpers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/thermal/thermal_helpers.c +2 -1
index 53dd92ccfd19..00a3df6a2d62 100644
@@ -175,7 +175,8 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz)
 	mutex_unlock(&tz->lock);
 }
 
-void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev, int target)
+static void thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev,
+				       int target)
 {
 	if (cdev->ops->set_cur_state(cdev, target))
 		return;