Re: [PATCH v4 04/11] iio: amplifiers: ad8366: add local dev pointer to the probe function

Jonathan Cameron
2026-02-14T18:34:55Z

On Tue, 10 Feb 2026 22:03:11 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:

> On Tue, Feb 10, 2026 at 09:58:52PM +0200, Andy Shevchenko wrote:
> > On Tue, Feb 10, 2026 at 07:42:04PM +0000, Rodrigo Alencar via B4 Relay wrote:
> >
> > > Create local device pointer in the probe function to shorten lines,
> > > making the code easier to read.
> >
> > Only a single place to convert?
>
> *Yes, I understand the intention, you need to explain that in the cover letter
> and/or here in the comment block.
>
Consistency matters, so once you have this local variable use it everywhere.

There are a few others in the code as it stands. If you are going to happen to
remove all those lines in later patches, then fair enough to perhaps add a comment
to say that you haven't touched them for reasons of churn avoidance.

If not I'd expect all spi->dev usage in probe to be replaced.

Jonathan