Re: [PATCH v4 2/2] thermal: sysfs: Rework the reading of trip point attributes

From: Daniel Lezcano
Date: Wed Dec 06 2023 - 06:35:40 EST


On 05/12/2023 13:26, Rafael J. Wysocki wrote:
From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

Rework the _show() callback functions for the trip point temperature,
hysteresis and type attributes to avoid copying the values of struct
thermal_trip fields that they do not use and make them carry out the
same validation checks as the corresponding _store() callback functions.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
---

v3 -> v4: Don't check trip_id against boundaries in the _show routines
for trip type, temperature and hysteresis (Daniel).

v2 -> v3: Drop a redundant 'ret' check at the end of trip_point_hyst_show.

v1 -> v2: Do not drop thermal zone locking from the _store() callback functions.

---

Reviewed-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>

--
<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