]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
thermal: core: Rename function argument related to trip crossing
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 16 Jan 2025 19:31:56 +0000 (20:31 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 17 Jan 2025 17:48:58 +0000 (18:48 +0100)
Rename the 'crossed_up' function argument to 'upward', which is more
proper English and a better match for representing temperature change
direction, everywhere in the code.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/2360961.ElGaqSPkdT@rjwysocki.net
[ rjw: Rebased ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/gov_bang_bang.c
drivers/thermal/gov_user_space.c
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h

index 20d4e0940eca101450638a6b0adc1cc7d3bd1b83..51951967d67fb1267f71bd43a6b333684a92da2b 100644 (file)
@@ -58,11 +58,11 @@ static void bang_bang_set_instance_target(struct thermal_instance *instance,
  * bang_bang_trip_crossed - controls devices associated with the given zone
  * @tz: thermal_zone_device
  * @trip: the trip point
- * @crossed_up: whether or not the trip has been crossed on the way up
+ * @upward: whether or not the trip has been crossed on the way up
  */
 static void bang_bang_trip_crossed(struct thermal_zone_device *tz,
                                   const struct thermal_trip *trip,
-                                  bool crossed_up)
+                                  bool upward)
 {
        const struct thermal_trip_desc *td = trip_to_trip_desc(trip);
        struct thermal_instance *instance;
@@ -74,7 +74,7 @@ static void bang_bang_trip_crossed(struct thermal_zone_device *tz,
                tz->temperature, trip->hysteresis);
 
        list_for_each_entry(instance, &td->thermal_instances, trip_node)
-               bang_bang_set_instance_target(instance, crossed_up);
+               bang_bang_set_instance_target(instance, upward);
 }
 
 static void bang_bang_manage(struct thermal_zone_device *tz)
index 8a061a10162a6e4893164e590966ffb90b6888d1..ef95cf7d65efbef8282a183d470117da31b1b589 100644 (file)
@@ -26,13 +26,13 @@ static int user_space_bind(struct thermal_zone_device *tz)
  * user_space_trip_crossed - Notify user space about trip crossing events
  * @tz: thermal_zone_device
  * @trip: trip point
- * @crossed_up: whether or not the trip has been crossed on the way up
+ * @upward: whether or not the trip has been crossed on the way up
  *
  * This function notifies the user space through UEvents.
  */
 static void user_space_trip_crossed(struct thermal_zone_device *tz,
                                    const struct thermal_trip *trip,
-                                   bool crossed_up)
+                                   bool upward)
 {
        char *thermal_prop[5];
        int i;
index 19a3894ad752a91ef621794abbeec9abfb2323ec..2328ac0d8561b1d051a0dea6d7565c145d584cbb 100644 (file)
@@ -453,23 +453,23 @@ static void move_to_trips_invalid(struct thermal_zone_device *tz,
 static void thermal_governor_trip_crossed(struct thermal_governor *governor,
                                          struct thermal_zone_device *tz,
                                          const struct thermal_trip *trip,
-                                         bool crossed_up)
+                                         bool upward)
 {
        if (trip->type == THERMAL_TRIP_HOT || trip->type == THERMAL_TRIP_CRITICAL)
                return;
 
        if (governor->trip_crossed)
-               governor->trip_crossed(tz, trip, crossed_up);
+               governor->trip_crossed(tz, trip, upward);
 }
 
 static void thermal_trip_crossed(struct thermal_zone_device *tz,
                                 struct thermal_trip_desc *td,
                                 struct thermal_governor *governor,
-                                bool crossed_up)
+                                bool upward)
 {
        const struct thermal_trip *trip = &td->trip;
 
-       if (crossed_up) {
+       if (upward) {
                if (trip->type == THERMAL_TRIP_PASSIVE)
                        tz->passive++;
                else if (trip->type == THERMAL_TRIP_CRITICAL ||
@@ -486,7 +486,7 @@ static void thermal_trip_crossed(struct thermal_zone_device *tz,
                thermal_notify_tz_trip_down(tz, trip);
                thermal_debug_tz_trip_down(tz, trip);
        }
-       thermal_governor_trip_crossed(governor, tz, trip, crossed_up);
+       thermal_governor_trip_crossed(governor, tz, trip, upward);
 }
 
 void thermal_zone_set_trip_hyst(struct thermal_zone_device *tz,
index be271e7c8f4141146a03efecc82fc4036ec12df6..09866f0ce76585d4c7f2322ee62030fc1af9afc2 100644 (file)
@@ -56,7 +56,7 @@ struct thermal_governor {
        void (*unbind_from_tz)(struct thermal_zone_device *tz);
        void (*trip_crossed)(struct thermal_zone_device *tz,
                             const struct thermal_trip *trip,
-                            bool crossed_up);
+                            bool upward);
        void (*manage)(struct thermal_zone_device *tz);
        void (*update_tz)(struct thermal_zone_device *tz,
                          enum thermal_notify_event reason);