lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] thermal/drivers/armada: Use the thermal_zone_get_crit_temp()
From

Hi Miquel,

On 24/01/2023 12:04, Miquel Raynal wrote:
> Hi Daniel,
>
> daniel.lezcano@linaro.org wrote on Wed, 18 Jan 2023 23:26:10 +0100:
>
>> The driver browses the trip point to find out the critical trip
>> temperature. However the function thermal_zone_get_crit_temp() does
>> already that, so the routine is pointless in the driver.
>>
>> Use thermal_zone_get_crit_temp() instead of inspecting all the trip
>> points.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>> drivers/thermal/armada_thermal.c | 38 +++++++++++++-------------------

[ ... ]

>
> Makes sense.
>
> Nit: I would actually put that comment in the commit log rather than
> keeping it in the code, but whatever, that's a nice simplification.

Ok, I'll do the change.

>> + armada_set_overheat_thresholds(priv, temperature, 0);
>> + priv->overheat_sensor = tz;
>> + priv->interrupt_source = sensor_id;
>> + armada_enable_overheat_interrupt(priv);
>>
>> - return -EINVAL;
>> + return 0;
>> }
>>
>> static int armada_thermal_probe(struct platform_device *pdev)
>
> LGTM so,
>
> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

Thanks for the review

-- Daniel

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

\
 
 \ /
  Last update: 2023-03-26 23:53    [W:0.050 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site