[PATCH RFC 8/9] thermal/acpi: Remove active and enabled flags

From: Daniel Lezcano
Date: Tue Oct 04 2022 - 13:28:07 EST


The 'active' field in the struct acpi_thermal_state is never used.

The 'enabled' field of the structure acpi_thermal_state_flags is
assigned but never used.

Remove them.

Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
---
drivers/acpi/thermal.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 116e5cf19c5d..f530dbfa80db 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -117,14 +117,12 @@ struct acpi_thermal_state {
u8 critical:1;
u8 hot:1;
u8 passive:1;
- u8 active:1;
u8 reserved:4;
int active_index;
};

struct acpi_thermal_state_flags {
u8 valid:1;
- u8 enabled:1;
u8 reserved:6;
};

@@ -1139,17 +1137,14 @@ static int acpi_thermal_resume(struct device *dev)
for (i = ACPI_THERMAL_TRIP_ACTIVE; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
if (!tz->trips[i].flags.valid)
break;
- tz->trips[i].flags.enabled = 1;
+
for (j = 0; j < tz->trips[i].devices.count; j++) {
result = acpi_bus_update_power(
tz->trips[i].devices.handles[j],
&power_state);
- if (result || (power_state != ACPI_STATE_D0)) {
- tz->trips[i].flags.enabled = 0;
+ if (result || (power_state != ACPI_STATE_D0))
break;
- }
}
- tz->state.active |= tz->trips[i].flags.enabled;
}

acpi_queue_thermal_check(tz);
--
2.34.1