Re: [PATCH RESEND] tools/lib/thermal: fix sampling handler context ptr

From: Daniel Lezcano
Date: Thu Oct 17 2024 - 06:11:09 EST


On 15/10/2024 19:18, juhl.emildahl@xxxxxxxxx wrote:
From: Emil Dahl Juhl <emdj@xxxxxxxxxxxxxxx>

The sampling handler, provided by the user alongside a void* context,
was invoked with an internal structure instead of the user context.

Correct the invocation of the sampling handler to pass the user context
pointer instead.

Note that the approach taken is similar to that in events.c, and will
reduce the chances of this mistake happening if additional sampling
callbacks are added.

Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library")
Signed-off-by: Emil Dahl Juhl <emdj@xxxxxxxxxxxxxxx>
---

Applied, thanks


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