Re: [PATCH v3 2/4] iio: temperature: ltc2983: convert to dev_err_probe()

From: Andy Shevchenko
Date: Thu Jun 06 2024 - 10:22:05 EST


On Thu, Jun 06, 2024 at 02:27:03PM +0200, Nuno Sá wrote:
> On Thu, 2024-06-06 at 13:17 +0300, Andy Shevchenko wrote:
> > On Thu, Jun 06, 2024 at 09:22:38AM +0200, Nuno Sa wrote:

...

> > > + return dev_err_ptr_probe(&st->spi->dev, -EINVAL,
> >
> > You can make all these lines shorter by using
> >
> > struct device *dev = &st->spi->dev; // or analogue
> >
> > at the top of the function.
> >
>
> Well, I had that in v2 (making the whole driver coherent with the local struct
> device helper but you kind of "complained" for a precursor patch (on a
> devm_kzalloc() call). So basically I deferred that change for a follow up patch.

Hmm... I don't remember the story behind this, but probably it's good to have
this done one (precursor) or the other way (follow up). Just check how many
changes will be done, whichever diff is shorter, choose that one.

--
With Best Regards,
Andy Shevchenko