Re: [PATCH v4 4/9] iio: temperature: ltc2983: Use local device pointer consistently

From: Jonathan Cameron

Date: Wed Jun 03 2026 - 10:20:40 EST


On Wed, 3 Jun 2026 02:25:32 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Wed, May 27, 2026 at 05:18:20PM +0100, Jonathan Cameron wrote:
> > On Mon, 25 May 2026 19:39:31 +0300
> > Liviu Stan <liviu.stan@xxxxxxxxxx> wrote:
> >
> > > Some functions define a local 'dev' pointer but still use bare
> > > '&st->spi->dev' in some code paths, and some don't have it at all.
> > > Replace bare references with the local pointer for consistency and
> > > collapse some wrapped lines that now fit within 80 characters.
> > >
> > > Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> > > Signed-off-by: Liviu Stan <liviu.stan@xxxxxxxxxx>
> > Applied to the testing branch of iio.git.
>
> As I said, this has to be split to three patches.
> Can we drop it? Or is it late already?
>
This only seems to be doing one of the 3 sets of things you suggest.
"
So, this has to be split to three:
- dropping dup message
- moving to devm_kcalloc() and at the same time define local dev in the probe
(and only in the probe without changing anything else)
- this patch
"

The argument for the ordering is small. The duplicate message line gets
modified then dropped - not ideal but not a big thing.

The devm_kcalloc() isn't in here.

Given where we are in the cycle I'm not keen to back this out to get
the ideal ordering of changes.

Jonathan