ACPI: thermal: Drop redundant trip point flags
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 12 Sep 2023 18:46:02 +0000 (20:46 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 26 Sep 2023 15:58:34 +0000 (17:58 +0200)
Trip point flags previously used by the driver need not be used any more
after the preceding changes, so drop them and adjust the code accordingly.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/acpi/thermal.c

index a6599b19dba88ef48684b070676782b8918419d7..c5ff542bcbf32ec8b4b1a97046a747ae98a441a8 100644 (file)
 #define ACPI_THERMAL_MAX_ACTIVE                10
 #define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65
 
-#define ACPI_TRIPS_PASSIVE     BIT(0)
-#define ACPI_TRIPS_ACTIVE      BIT(1)
-#define ACPI_TRIPS_DEVICES     BIT(2)
-
-#define ACPI_TRIPS_THRESHOLDS  (ACPI_TRIPS_PASSIVE | ACPI_TRIPS_ACTIVE)
-
-#define ACPI_TRIPS_INIT                (ACPI_TRIPS_THRESHOLDS | ACPI_TRIPS_DEVICES)
-
 /*
  * This exception is thrown out in two cases:
  * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid
  * 2.TODO: Devices listed in _PSL, _ALx, _TZD may change.
  *   We need to re-bind the cooling devices of a thermal zone when this occurs.
  */
-#define ACPI_THERMAL_TRIPS_EXCEPTION(flags, tz, str) \
+#define ACPI_THERMAL_TRIPS_EXCEPTION(tz, str) \
 do { \
-       if (flags != ACPI_TRIPS_INIT) \
-               acpi_handle_info(tz->device->handle, \
-                       "ACPI thermal trip point %s changed\n" \
-                       "Please report to linux-acpi@vger.kernel.org\n", str); \
+       acpi_handle_info(tz->device->handle, \
+                        "ACPI thermal trip point %s changed\n" \
+                        "Please report to linux-acpi@vger.kernel.org\n", str); \
 } while (0)
 
 static int act;
@@ -212,7 +203,7 @@ static void acpi_thermal_update_passive_trip(struct acpi_thermal *tz)
 
        update_acpi_thermal_trip_temp(acpi_trip, get_passive_temp(tz));
        if (!acpi_trip->valid)
-               ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_PASSIVE, tz, "state");
+               ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state");
 }
 
 static bool update_passive_devices(struct acpi_thermal *tz, bool compare)
@@ -230,7 +221,7 @@ static bool update_passive_devices(struct acpi_thermal *tz, bool compare)
        }
 
        if (compare && memcmp(&tz->trips.passive.devices, &devices, sizeof(devices)))
-               ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_PASSIVE, tz, "device");
+               ACPI_THERMAL_TRIPS_EXCEPTION(tz, "device");
 
        memcpy(&tz->trips.passive.devices, &devices, sizeof(devices));
        return true;
@@ -247,7 +238,7 @@ static void acpi_thermal_update_passive_devices(struct acpi_thermal *tz)
                return;
 
        update_acpi_thermal_trip_temp(acpi_trip, THERMAL_TEMP_INVALID);
-       ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_PASSIVE, tz, "state");
+       ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state");
 }
 
 static long get_active_temp(struct acpi_thermal *tz, int index)
@@ -282,7 +273,7 @@ static void acpi_thermal_update_active_trip(struct acpi_thermal *tz, int index)
 
        update_acpi_thermal_trip_temp(acpi_trip, get_active_temp(tz, index));
        if (!acpi_trip->valid)
-               ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_ACTIVE, tz, "state");
+               ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state");
 }
 
 static bool update_active_devices(struct acpi_thermal *tz, int index, bool compare)
@@ -302,7 +293,7 @@ static bool update_active_devices(struct acpi_thermal *tz, int index, bool compa
        }
 
        if (compare && memcmp(&tz->trips.active[index].devices, &devices, sizeof(devices)))
-               ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_ACTIVE, tz, "device");
+               ACPI_THERMAL_TRIPS_EXCEPTION(tz, "device");
 
        memcpy(&tz->trips.active[index].devices, &devices, sizeof(devices));
        return true;
@@ -319,7 +310,7 @@ static void acpi_thermal_update_active_devices(struct acpi_thermal *tz, int inde
                return;
 
        update_acpi_thermal_trip_temp(acpi_trip, THERMAL_TEMP_INVALID);
-       ACPI_THERMAL_TRIPS_EXCEPTION(ACPI_TRIPS_ACTIVE, tz, "state");
+       ACPI_THERMAL_TRIPS_EXCEPTION(tz, "state");
 }
 
 static int acpi_thermal_adjust_trip(struct thermal_trip *trip, void *data)