Re: [PATCH V2 06/13] thermal/drivers/hisi: Remove pointless lock

From: Daniel Lezcano
Date: Fri Sep 08 2017 - 05:31:10 EST


On 08/09/2017 05:16, Eduardo Valentin wrote:
> On Mon, Sep 04, 2017 at 09:56:05PM +0200, Daniel Lezcano wrote:
>> The threaded interrupt inspect the sensors structure to look in the temp
>> threshold field, but this field is read-only in all the code, except in the
>> probe function before the threaded interrupt is set. In other words there
>> is not race window in the threaded interrupt when reading the field value.
>
>
> Sure? Not even if you have a userspace process read the zone temp via
> sysfs and the polling workqueue reading the temp too?

They are both read-only operations. There is no write-read race.


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