Misc thermal cleanup and fixes
v2 cover Misc thermal cleanup and fixes
This series is based on linux-pm/thermal
It unregisters the netlink generic family for thermal in case the thermal framework fails to initialize, removes a unneeded ida_destroy() call and moves the thermal trip code in a separate file.
A couple of changes have been removed from the previous version:
- Ordering the trip points. Some consolidation is needed in the set_trip_temp ops before ordering the trip points, so this change is postpone
- Remove the mutex destroy call. Even if the call is not needed, the justification of the change is not accurate. So it is postponed also.
V2:
- Removed ordering the trip points change
- Removed mutex destroy change
- Added "No functional change intented" as requested by Rui
- Added the function declaration for_each_thermal_trip
Daniel Lezcano (3):
thermal/core: Fix unregistering netlink at thermal init time thermal/core: Remove unneeded ida_destroy() thermal/core: Move the thermal trip code to a dedicated file
drivers/thermal/Makefile | 4 +- drivers/thermal/thermal_core.c | 93 +-------------- drivers/thermal/thermal_core.h | 4 + drivers/thermal/thermal_helpers.c | 62 ---------- drivers/thermal/thermal_netlink.c | 5 + drivers/thermal/thermal_netlink.h | 3 + drivers/thermal/thermal_trip.c | 182 ++++++++++++++++++++++++++++++ 7 files changed, 199 insertions(+), 154 deletions(-) create mode 100644 drivers/thermal/thermal_trip.c
Signature · 1 line
2.34.1
PATCH v2 1/3 thermal/core: Fix unregistering netlink at thermal init time
The thermal subsystem initialization miss an netlink unregistering function in the error. Add it.
--- drivers/thermal/thermal_core.c | 4 +++- drivers/thermal/thermal_netlink.c | 5 +++++ drivers/thermal/thermal_netlink.h | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-)
drivers/thermal/thermal_core.c +3 -1
@@ -1606,7 +1606,7 @@ static int __init thermal_init(void) result =thermal_register_governors ();if (result) - goto error; + goto unregister_netlink; result =class_register (&thermal_class);if (result)
@@ -1621,6 +1621,8 @@ static int __init thermal_init(void) unregister_governors:thermal_unregister_governors (); +unregister_netlink: +thermal_netlink_exit (); error:ida_destroy (&thermal_tz_ida);ida_destroy (&thermal_cdev_ida);
drivers/thermal/thermal_netlink.c +5 -0
@@ -699,3 +699,8 @@ int __init thermal_netlink_init(void) {return genl_register_family (&thermal_gnl_family); } + +void __init thermal_netlink_exit (void ) +{ +genl_unregister_family (&thermal_gnl_family); +}
drivers/thermal/thermal_netlink.h +3 -0
@@ -13,6 +13,7 @@ struct thermal_genl_cpu_caps {/* Netlink notification function */ #ifdef CONFIG_THERMAL_NETLINK int __init thermal_netlink_init (void ); +void __init thermal_netlink_exit (void );int thermal_notify_tz_create (int tz_id,const char *name);int thermal_notify_tz_delete (int tz_id);int thermal_notify_tz_enable (int tz_id);
@@ -115,4 +116,6 @@ static inline int thermal_genl_cpu_capability_event(int count, struct thermal_ge return 0; } +static inline void __init thermal_netlink_exit (void ) {} +#endif /* CONFIG_THERMAL_NETLINK */
Signature · 1 line
2.34.1
Re: [PATCH v2 1/3] thermal/core: Fix unregistering netlink at thermal init time
Quoted 1 line · Daniel Lezcano
The thermal subsystem initialization miss an netlink
s/miss an netlink/misses a netlink
other than that, the patch looks good to me.
-rui
Quoted 68 lines
unregistering
function in the error. Add it.Signed-off-by Daniel Lezcano <[email protected]>--- drivers/thermal/thermal_core.c | 4 +++- drivers/thermal/thermal_netlink.c | 5 +++++ drivers/thermal/thermal_netlink.h | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-)drivers/thermal/thermal_core.c +3
-1@@ -1606,7 +1606,7 @@ static int __init thermal_init(void) result =thermal_register_governors ();if (result) - goto error; + goto unregister_netlink; result =class_register (&thermal_class);if (result)@@ -1621,6 +1621,8 @@ static int __init thermal_init(void) unregister_governors:thermal_unregister_governors (); +unregister_netlink: +thermal_netlink_exit (); error:ida_destroy (&thermal_tz_ida);ida_destroy (&thermal_cdev_ida);drivers/thermal/thermal_netlink.c +5
-0@@ -699,3 +699,8 @@ int __init thermal_netlink_init(void) {return genl_register_family (&thermal_gnl_family); } + +void __init thermal_netlink_exit (void ) +{ +genl_unregister_family (&thermal_gnl_family); +}drivers/thermal/thermal_netlink.h +1
-0@@ -13,6 +13,7 @@ struct thermal_genl_cpu_caps {/* Netlink notification function */ #ifdef CONFIG_THERMAL_NETLINK int __init thermal_netlink_init (void ); +void __init thermal_netlink_exit (void );int thermal_notify_tz_create (int tz_id,const char *name);int thermal_notify_tz_delete (int tz_id);int thermal_notify_tz_enable (int tz_id);@@ -115,4 +116,6 @@ static inline intthermal_genl_cpu_capability_event(int count, struct
thermal_gedrivers/thermal/thermal_netlink.h +2
-0return 0; } +static inline void __init thermal_netlink_exit (void ) {} +#endif /* CONFIG_THERMAL_NETLINK */
PATCH v2 2/3 thermal/core: Remove unneeded ida_destroy()
In reply to Daniel LezcanoAs per documentation for the ida_destroy() function: "If the IDA is already empty, there is no need to call this function."
The thermal framework is in the init sequence, so the ida was not yet used and consequently it is empty in case of error.
There is no need to call ida_destroy(), let's remove the calls.
--- drivers/thermal/thermal_core.c | 2 -- 1 file changed, 2 deletions(-)
drivers/thermal/thermal_core.c +0 -2
@@ -1624,8 +1624,6 @@ static int __init thermal_init(void) unregister_netlink:thermal_netlink_exit (); error: -ida_destroy (&thermal_tz_ida); -ida_destroy (&thermal_cdev_ida);mutex_destroy (&thermal_list_lock);mutex_destroy (&thermal_governor_lock);return result;
Signature · 1 line
2.34.1
Re: [PATCH v2 2/3] thermal/core: Remove unneeded ida_destroy()
Quoted 9 lines · Daniel Lezcano
As per documentation for the
ida_destroy()function: "If the IDA is already empty, there is no need to call this function."The thermal framework is in the init sequence, so the ida was not yet used and consequently it is empty in case of error.
There is no need to call
ida_destroy(), let's remove the calls.Signed-off-by Daniel Lezcano <[email protected]>
thanks,
rui
Quoted 18 lines
--- drivers/thermal/thermal_core.c | 2 -- 1 file changed, 2 deletions(-)drivers/thermal/thermal_core.c +0
-2@@ -1624,8 +1624,6 @@ static int __init thermal_init(void) unregister_netlink:thermal_netlink_exit (); error: -ida_destroy (&thermal_tz_ida); -ida_destroy (&thermal_cdev_ida);mutex_destroy (&thermal_list_lock);mutex_destroy (&thermal_governor_lock);return result;
PATCH v2 3/3 thermal/core: Move the thermal trip code to a dedicated file
In reply to Daniel LezcanoThe thermal_core.c files contains a lot of functions handling different thermal components like the governors, the trip points, the cooling device, the OF cooling device, etc ...
This organization does not help to migrate to a more sane code where there is a better self-encapsulation as all the components' internals can be directly accessed from a single file.
For the sake of clarity, let's move the thermal trip points code in a dedicated thermal_trip.c file and add a function to browse all the trip points like we do with the thermal zones, the govenors and the cooling devices.
The same can be done for the cooling devices and the governor code but that will come later as the current work in the thermal framework is to fix the trip point handling and use a generic trip point structure.
No functional changes intended.
--- drivers/thermal/Makefile | 4 +- drivers/thermal/thermal_core.c | 87 -------------- drivers/thermal/thermal_core.h | 4 + drivers/thermal/thermal_helpers.c | 62 ---------- drivers/thermal/thermal_trip.c | 182 ++++++++++++++++++++++++++++++ 5 files changed, 188 insertions(+), 151 deletions(-) create mode 100644 drivers/thermal/thermal_trip.c
drivers/thermal/Makefile +2 -2
@@ -4,8 +4,8 @@ # obj-$(CONFIG_THERMAL) += thermal_sys.o -thermal_sys-y += thermal_core.o thermal_sysfs.o \ - thermal_helpers.o +thermal_sys-y += thermal_core.o thermal_sysfs.o +thermal_sys-y += thermal_trip.o thermal_helpers.o # netlink interface to manage the thermal framework thermal_sys-$(CONFIG_THERMAL_NETLINK) += thermal_netlink.o
drivers/thermal/thermal_core.c +0 -87
99 lines not on this page · raw message
drivers/thermal/thermal_core.h +4 -0
@@ -52,6 +52,10 @@ int for_each_thermal_cooling_device(int (*cb)(struct thermal_cooling_device *,int for_each_thermal_governor (int (*cb)(struct thermal_governor *,void *),void *thermal_governor); +int __for_each_thermal_trip (struct thermal_zone_device *, +int (*cb)(struct thermal_trip *,void *), +void *); +struct thermal_zone_device *thermal_zone_get_by_id (int id);struct thermal_attr {
drivers/thermal/thermal_helpers.c +0 -62
68 lines not on this page · raw message
drivers/thermal/thermal_trip.c new file +182 -0
182 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] thermal/core: Move the thermal trip code to a dedicated file
Quoted 19 lines · Daniel Lezcano
The
thermal_core.cfiles contains a lot of functions handling different thermal components like the governors, the trip points, the cooling device, the OF cooling device, etc ...This organization does not help to migrate to a more sane code where there is a better self-encapsulation as all the components' internals can be directly accessed from a single file.
For the sake of clarity, let's move the thermal trip points code in a dedicated
thermal_trip.cfile and add a function to browse all the trip points like we do with the thermal zones, the govenors and the cooling devices.The same can be done for the cooling devices and the governor code but
that will come later as the current work in the thermal framework is to fix the trip point handling and use a generic trip point structure.
Quoted 3 lines
No functional changes intended.
Signed-off-by Daniel Lezcano <[email protected]>
thanks,
rui
Quoted 456 lines
--- drivers/thermal/Makefile | 4 +- drivers/thermal/thermal_core.c | 87 -------------- drivers/thermal/thermal_core.h | 4 + drivers/thermal/thermal_helpers.c | 62 ---------- drivers/thermal/thermal_trip.c | 182 ++++++++++++++++++++++++++++++ 5 files changed, 188 insertions(+), 151 deletions(-) create mode 100644 drivers/thermal/thermal_trip.cdrivers/thermal/Makefile +1
-2@@ -4,8 +4,8 @@ # obj-$(CONFIG_THERMAL) += thermal_sys.o -thermal_sys-y += thermal_core.o thermal_sysfs.o \ - thermal_helpers.o +thermal_sys-y += thermal_core.othermal_sysfs.o
+thermal_sys-y += thermal_trip.o
thermal_helpers.o# netlink interface to manage the thermal framework thermal_sys-$(CONFIG_THERMAL_NETLINK) += thermal_netlink.odrivers/thermal/thermal_core.c +0
-0@@ -1155,12 +1155,6 @@ static void thermal_set_delay_jiffies(unsignedlong
*delay_jiffies, intdelay_msdrivers/thermal/thermal_core.c +0
-6*delay_jiffies =round_jiffies (*delay_jiffies); } -int thermal_zone_get_num_trips (struct thermal_zone_device *tz) -{ -return tz->num_trips; -} -EXPORT_SYMBOL_GPL (thermal_zone_get_num_trips); - int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int*temp)
{drivers/thermal/thermal_core.c +0
-30int i, ret = -EINVAL ;@@ -1187,87 +1181,6 @@ int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp) }EXPORT_SYMBOL_GPL (thermal_zone_get_crit_temp); -int __thermal_zone_get_trip (struct thermal_zone_device *tz,int trip_id, -struct thermal_trip *trip) -{ -int ret; - -if (!tz || trip_id <0 || trip_id >= tz->num_trips || !trip) -return -EINVAL ; - -if (tz->trips) { - *trip = tz->trips[trip_id]; -return 0 ; - } - -if (tz->ops->get_trip_hyst) { - ret = tz->ops->get_trip_hyst (tz, trip_id, &trip- >hysteresis); -if (ret) -return ret; - }else { - trip->hysteresis =0 ; - } - - ret = tz->ops->get_trip_temp (tz, trip_id, &trip->temperature); -if (ret) -return ret; - -return tz->ops->get_trip_type (tz, trip_id, &trip->type); -} -EXPORT_SYMBOL_GPL (__thermal_zone_get_trip); - -int thermal_zone_get_trip(struct thermal_zone_device *tz, int
trip_id,drivers/thermal/thermal_core.c +0
-13- struct thermal_trip *trip) -{ -int ret; - -mutex_lock (&tz->lock); - ret =__thermal_zone_get_trip (tz, trip_id, trip); -mutex_unlock (&tz->lock); - -return ret; -} -EXPORT_SYMBOL_GPL (thermal_zone_get_trip); - -int thermal_zone_set_trip(struct thermal_zone_device *tz, int
trip_id,drivers/thermal/thermal_core.c +0
-6- const struct thermal_trip *trip) -{ - struct thermal_trip t; - int ret; - - if (!tz->ops->set_trip_temp && !tz->ops->set_trip_hyst && !tz-Quoted 1 line
trips)
drivers/thermal/thermal_core.c +0
-10-return -EINVAL ; - - ret =__thermal_zone_get_trip (tz, trip_id, &t); -if (ret) -return ret; - -if (t.type != trip->type) -return -EINVAL ; - - if (t.temperature != trip->temperature && tz->ops-Quoted 1 line
set_trip_temp) {drivers/thermal/thermal_core.c +0
-1- ret = tz->ops->set_trip_temp(tz, trip_id, trip-Quoted 1 line
temperature);
drivers/thermal/thermal_core.c +0
-5-if (ret) -return ret; - } - -if (t.hysteresis != trip->hysteresis && tz->ops->set_trip_hyst){
drivers/thermal/thermal_core.c +0
-1- ret = tz->ops->set_trip_hyst(tz, trip_id, trip-Quoted 1 line
hysteresis);
drivers/thermal/thermal_core.c +0
-5-if (ret) -return ret; - } - - if (tz->trips && (t.temperature != trip->temperature ||t.hysteresis !=
trip->hysteresis))drivers/thermal/thermal_core.c +0
-4- tz->trips[trip_id] = *trip; - - thermal_notify_tz_trip_change(tz->id, trip_id, trip->type, - trip->temperature, trip-Quoted 1 line
hysteresis);
drivers/thermal/thermal_core.c +0
-6- -__thermal_zone_device_update (tz,THERMAL_TRIP_CHANGED ); - -return 0 ; -} -/** * thermal_zone_device_register_with_trips() - register a new thermal zone device
* @type: the thermal zone device typedrivers/thermal/thermal_core.h +4
-0@@ -52,6 +52,10 @@ int for_each_thermal_cooling_device(int (*cb)(struct thermal_cooling_device *, int for_each_thermal_governor(int (*cb)(struct thermal_governor *, void *), void *thermal_governor); +int __for_each_thermal_trip (struct thermal_zone_device *, +int (*cb)(struct thermal_trip *,void *), +void *); +struct thermal_zone_device *thermal_zone_get_by_id (int id);struct
thermal_attr{drivers/thermal/thermal_helpers.c +0
-2@@ -146,68 +146,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) }EXPORT_SYMBOL_GPL (thermal_zone_get_temp); -/** -* __thermal_zone_set_trips - Computes the next trip points for the driver
- * @tz: a pointer to a thermal zone device structure
- *
- * The function computes the next temperature boundaries by browsing
- * the trip points. The result is the closer low and high trip points
- * to the current temperature. These values are passed to the backend
- * driver to let it set its own notification mechanism (usually an
- * interrupt).
- *
- * This function must be called withtz->lockheld. Both tz and tz-Quoted 1 line
ops
- * must be valid pointers.
- *
- * It does not return a value
- */drivers/thermal/thermal_helpers.c +0
-37-void __thermal_zone_set_trips (struct thermal_zone_device *tz) -{ -struct thermal_trip trip; -int low = -INT_MAX , high =INT_MAX ; -int i, ret; - -lockdep_assert_held (&tz->lock); - -if (!tz->ops->set_trips) -return ; - -for (i =0 ; i < tz->num_trips; i++) { -int trip_low; - - ret =__thermal_zone_get_trip (tz, i , &trip); -if (ret) -return ; - - trip_low = trip.temperature - trip.hysteresis; - -if (trip_low < tz->temperature && trip_low > low) - low = trip_low; - -if (trip.temperature > tz->temperature && - trip.temperature < high) - high = trip.temperature; - } - -/* No need to change trip points */ -if (tz->prev_low_trip == low && tz->prev_high_trip == high) -return ; - - tz->prev_low_trip = low; - tz->prev_high_trip = high; - - dev_dbg(&tz->device, - "new temperature boundaries: %d < x < %d\n", low,high);
drivers/thermal/thermal_helpers.c +0
-3- -/* -* Set a temperature window. When this window is left the driver
drivers/thermal/thermal_helpers.c +0
-7-* must inform the thermal core via thermal_zone_device_update. -*/ - ret = tz->ops->set_trips (tz, low, high); -if (ret) -dev_err (&tz->device,"Failed to set trips: %d\n" , ret); -} - static void thermal_cdev_set_cur_state(struct thermal_cooling_device*cdev,
drivers/thermal/thermal_helpers.c +0
-0int target) {drivers/thermal/thermal_trip.c new file +42
-0@@ -0,0 +1,182 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2008 Intel Corp +* Copyright (C) 2008 Zhang Rui <[email protected]> +* Copyright (C) 2008 Sujith Thomas <[email protected]> +* Copyright 2022 Linaro Limited +* +* Thermal trips handling +*/ +#include "thermal_core.h" + +int __for_each_thermal_trip (struct thermal_zone_device *tz, +int (*cb)(struct thermal_trip *,void *), +void *data) +{ +int i, ret; +struct thermal_trip trip; + +lockdep_assert_held (&tz->lock); + +for (i =0 ; i < tz->num_trips; i++) { + + ret =__thermal_zone_get_trip (tz, i, &trip); +if (ret) +return ret; + + ret =cb (&trip, data); +if (ret) +return ret; + } + +return 0 ; +} + +int thermal_zone_get_num_trips (struct thermal_zone_device *tz) +{ +return tz->num_trips; +} +EXPORT_SYMBOL_GPL (thermal_zone_get_num_trips); + +/** +* __thermal_zone_set_trips - Computes the next trip points for the driver
+ * @tz: a pointer to a thermal zone device structure
+ *
+ * The function computes the next temperature boundaries by browsing
+ * the trip points. The result is the closer low and high trip points
+ * to the current temperature. These values are passed to the backend
+ * driver to let it set its own notification mechanism (usually an
+ * interrupt).
+ *
+ * This function must be called withtz->lockheld. Both tz and tz-Quoted 1 line
ops
+ * must be valid pointers.
+ *
+ * It does not return a value
+ */drivers/thermal/thermal_trip.c new file +37
-0+void __thermal_zone_set_trips (struct thermal_zone_device *tz) +{ +struct thermal_trip trip; +int low = -INT_MAX , high =INT_MAX ; +int i, ret; + +lockdep_assert_held (&tz->lock); + +if (!tz->ops->set_trips) +return ; + +for (i =0 ; i < tz->num_trips; i++) { +int trip_low; + + ret =__thermal_zone_get_trip (tz, i , &trip); +if (ret) +return ; + + trip_low = trip.temperature - trip.hysteresis; + +if (trip_low < tz->temperature && trip_low > low) + low = trip_low; + +if (trip.temperature > tz->temperature && + trip.temperature < high) + high = trip.temperature; + } + +/* No need to change trip points */ +if (tz->prev_low_trip == low && tz->prev_high_trip == high) +return ; + + tz->prev_low_trip = low; + tz->prev_high_trip = high; + + dev_dbg(&tz->device, + "new temperature boundaries: %d < x < %d\n", low,high);
drivers/thermal/thermal_trip.c new file +3
-0+ +/* +* Set a temperature window. When this window is left the driver
drivers/thermal/thermal_trip.c new file +8
-0+* must inform the thermal core via thermal_zone_device_update. +*/ + ret = tz->ops->set_trips (tz, low, high); +if (ret) +dev_err (&tz->device,"Failed to set trips: %d\n" , ret); +} + +int __thermal_zone_get_trip(struct thermal_zone_device *tz, int
trip_id,drivers/thermal/thermal_trip.c new file +14
-0+ struct thermal_trip *trip) +{ +int ret; + +if (!tz || trip_id <0 || trip_id >= tz->num_trips || !trip) +return -EINVAL ; + +if (tz->trips) { + *trip = tz->trips[trip_id]; +return 0 ; + } + +if (tz->ops->get_trip_hyst) { + ret = tz->ops->get_trip_hyst(tz, trip_id, &trip-Quoted 1 line
hysteresis);
drivers/thermal/thermal_trip.c new file +15
-0+if (ret) +return ret; + }else { + trip->hysteresis =0 ; + } + + ret = tz->ops->get_trip_temp (tz, trip_id, &trip->temperature); +if (ret) +return ret; + +return tz->ops->get_trip_type (tz, trip_id, &trip->type); +} +EXPORT_SYMBOL_GPL (__thermal_zone_get_trip); + +int thermal_zone_get_trip(struct thermal_zone_device *tz, int
trip_id,drivers/thermal/thermal_trip.c new file +13
-0+ struct thermal_trip *trip) +{ +int ret; + +mutex_lock (&tz->lock); + ret =__thermal_zone_get_trip (tz, trip_id, trip); +mutex_unlock (&tz->lock); + +return ret; +} +EXPORT_SYMBOL_GPL (thermal_zone_get_trip); + +int thermal_zone_set_trip(struct thermal_zone_device *tz, int
trip_id,drivers/thermal/thermal_trip.c new file +6
-0+ const struct thermal_trip *trip) +{ + struct thermal_trip t; + int ret; + + if (!tz->ops->set_trip_temp && !tz->ops->set_trip_hyst && !tz-Quoted 1 line
trips)
drivers/thermal/thermal_trip.c new file +10
-0+return -EINVAL ; + + ret =__thermal_zone_get_trip (tz, trip_id, &t); +if (ret) +return ret; + +if (t.type != trip->type) +return -EINVAL ; + + if (t.temperature != trip->temperature && tz->ops-Quoted 1 line
set_trip_temp) {drivers/thermal/thermal_trip.c new file +1
-0+ ret = tz->ops->set_trip_temp(tz, trip_id, trip-Quoted 1 line
temperature);
drivers/thermal/thermal_trip.c new file +5
-0+if (ret) +return ret; + } + +if (t.hysteresis != trip->hysteresis && tz->ops->set_trip_hyst){
drivers/thermal/thermal_trip.c new file +1
-0+ ret = tz->ops->set_trip_hyst(tz, trip_id, trip-Quoted 1 line
hysteresis);
drivers/thermal/thermal_trip.c new file +5
-0+if (ret) +return ret; + } + + if (tz->trips && (t.temperature != trip->temperature ||t.hysteresis !=
trip->hysteresis))drivers/thermal/thermal_trip.c new file +4
-0+ tz->trips[trip_id] = *trip; + + thermal_notify_tz_trip_change(tz->id, trip_id, trip->type, + trip->temperature, trip-Quoted 1 line
hysteresis);
drivers/thermal/thermal_trip.c new file +5
-0+ +__thermal_zone_device_update (tz,THERMAL_TRIP_CHANGED ); + +return 0 ; +}
Hi Rafael,
will you take this series on your branch ?
Quoted 35 lines · Daniel Lezcano
This series is based on linux-pm/thermal
It unregisters the netlink generic family for thermal in case the thermal framework fails to initialize, removes a unneeded
ida_destroy()call and moves the thermal trip code in a separate file.A couple of changes have been removed from the previous version:
- Ordering the trip points. Some consolidation is needed in the
set_trip_tempops before ordering the trip points, so this change is postpone- Remove the mutex destroy call. Even if the call is not needed, the justification of the change is not accurate. So it is postponed also.
V2:
- Removed ordering the trip points change
- Removed mutex destroy change
- Added "No functional change intented" as requested by Rui
- Added the function declarationfor_each_thermal_tripDaniel Lezcano (3):
thermal/core: Fix unregistering netlink at thermal init time thermal/core: Remove unneededida_destroy()thermal/core: Move the thermal trip code to a dedicated filedrivers/thermal/Makefile | 4 +- drivers/thermal/thermal_core.c | 93 +-------------- drivers/thermal/thermal_core.h | 4 + drivers/thermal/thermal_helpers.c | 62 ---------- drivers/thermal/thermal_netlink.c | 5 + drivers/thermal/thermal_netlink.h | 3 + drivers/thermal/thermal_trip.c | 182 ++++++++++++++++++++++++++++++ 7 files changed, 199 insertions(+), 154 deletions(-)create mode 100644
drivers/thermal/thermal_trip.c
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
Rafael J. Wysocki
maintainerQuoted 5 lines · Daniel Lezcano
Hi Rafael,
will you take this series on your branch ?
Yes, I'm planning to do that, if I don't find any issues with it (not likely though).
Quoted 38 lines · Daniel Lezcano
Quoted 33 lines
This series is based on linux-pm/thermal
It unregisters the netlink generic family for thermal in case the thermal framework fails to initialize, removes a unneeded
ida_destroy()call and moves the thermal trip code in a separate file.A couple of changes have been removed from the previous version:
- Ordering the trip points. Some consolidation is needed in the
set_trip_tempops before ordering the trip points, so this change is postpone- Remove the mutex destroy call. Even if the call is not needed, the justification of the change is not accurate. So it is postponed also.
V2:
- Removed ordering the trip points change
- Removed mutex destroy change
- Added "No functional change intented" as requested by Rui
- Added the function declarationfor_each_thermal_tripDaniel Lezcano (3):
thermal/core: Fix unregistering netlink at thermal init time thermal/core: Remove unneededida_destroy()thermal/core: Move the thermal trip code to a dedicated filedrivers/thermal/Makefile | 4 +- drivers/thermal/thermal_core.c | 93 +-------------- drivers/thermal/thermal_core.h | 4 + drivers/thermal/thermal_helpers.c | 62 ---------- drivers/thermal/thermal_netlink.c | 5 + drivers/thermal/thermal_netlink.h | 3 + drivers/thermal/thermal_trip.c | 182 ++++++++++++++++++++++++++++++ 7 files changed, 199 insertions(+), 154 deletions(-)Quoted 2 lines
create mode 100644
drivers/thermal/thermal_trip.c--
Rafael J. Wysocki
maintainerQuoted 11 lines · Rafael J. Wysocki
Quoted 5 lines · Daniel Lezcano
Hi Rafael,
will you take this series on your branch ?
Yes, I'm planning to do that, if I don't find any issues with it (not likely though).
I've just queued it up for 6.3.
Quoted 38 lines
Quoted 38 lines · Daniel Lezcano
Quoted 33 lines
This series is based on linux-pm/thermal
It unregisters the netlink generic family for thermal in case the thermal framework fails to initialize, removes a unneeded
ida_destroy()call and moves the thermal trip code in a separate file.A couple of changes have been removed from the previous version:
- Ordering the trip points. Some consolidation is needed in the
set_trip_tempops before ordering the trip points, so this change is postpone- Remove the mutex destroy call. Even if the call is not needed, the justification of the change is not accurate. So it is postponed also.
V2:
- Removed ordering the trip points change
- Removed mutex destroy change
- Added "No functional change intented" as requested by Rui
- Added the function declarationfor_each_thermal_tripDaniel Lezcano (3):
thermal/core: Fix unregistering netlink at thermal init time thermal/core: Remove unneededida_destroy()thermal/core: Move the thermal trip code to a dedicated filedrivers/thermal/Makefile | 4 +- drivers/thermal/thermal_core.c | 93 +-------------- drivers/thermal/thermal_core.h | 4 + drivers/thermal/thermal_helpers.c | 62 ---------- drivers/thermal/thermal_netlink.c | 5 + drivers/thermal/thermal_netlink.h | 3 + drivers/thermal/thermal_trip.c | 182 ++++++++++++++++++++++++++++++ 7 files changed, 199 insertions(+), 154 deletions(-)Quoted 2 lines
create mode 100644
drivers/thermal/thermal_trip.c--