Re: [PATCH] iio: inkern: fix channel read regression
From: Johan Hovold
Date: Mon Jun 03 2024 - 03:24:49 EST
Hi Jonathan,
On Sat, Jun 01, 2024 at 02:21:47PM +0100, Jonathan Cameron wrote:
> On Thu, 30 May 2024 09:44:16 +0200
> Johan Hovold <johan+linaro@xxxxxxxxxx> wrote:
>
> > A recent "cleanup" broke IIO channel read outs and thereby thermal
> > mitigation on the Lenovo ThinkPad X13s by returning zero instead of the
> > expected IIO value type in iio_read_channel_processed_scale():
> >
> > thermal thermal_zone12: failed to read out thermal zone (-22)
> >
> > Fixes: 3092bde731ca ("iio: inkern: move to the cleanup.h magic")
> > Cc: Nuno Sa <nuno.sa@xxxxxxxxxx>
> > Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
> In meantime, Nuno please take another look at these and see if
> we have additional problem cases like this. Given the patch
> queue I have and a busy few days it will be a while before I
> get to it but I'll try and take a close look soon as well.
Please consider getting this one into mainline as soon as possible as it
breaks thermal mitigation, which can cause literal skin burns, on all
Qualcomm platforms (and probably other platforms too).
> Longer term, in my view the readability and chance of bugs
> is reduced, but churn always introduces the possibility of
> issues like this in the short term :(
I just worry about some of the cleanup.h conversion I've seen where
inexperienced developers potentially break tested and reviewed code for
something which is often not very readable and for very little gain.
Johan