Re: [PATCH v2 1/1] iio: core: Simplify IIO core managed APIs
From: Andy Shevchenko
Date: Tue Feb 24 2026 - 04:18:04 EST
On Mon, Feb 23, 2026 at 09:00:35PM +0000, Jonathan Cameron wrote:
> On Sun, 22 Feb 2026 21:07:10 +0200
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Sun, Feb 22, 2026 at 04:54:11PM +0000, Jonathan Cameron wrote:
> > > On Fri, 20 Feb 2026 14:25:19 +0100
> > > Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > >
> > > > Use devm_add_action_or_reset() instead of devres_alloc() and
> > > > devres_add(), which works the same. This will simplify the
> > > > code. There is no functional changes.
> > > >
> > > > While at it, inline devm_iio_kfifo_allocate() into its only user.
> > > >
> > > > Reviewed-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > > Nice. Applied
> >
> > Thanks!
> >
> > One minor thing though. The iio_kfifo_alloc()/free() uses variable name 'r'
> > while devm_iio_kfifo_alloc() uses 'buffer'. I was thinking again and now
> > I probably would go with 'buffer' in devm_iio_kfifo_release() as well
> > to have a symmetry with the devm_*_alloc(). If you think it worth changing,
> > may you fold it? (AFAIU the applied patch is still in the pending/testing
> > queue that is okay for rebase, squash, et cetera.)
> >
> Ok. Whilst looking at this I noticed there was a stray docs
> reference to devm_iio_kfifo_alloc() Which doesn't exist any more so
> I updated that to refer to iio_kfifo_alloc() which is what is called.
Thank you!
--
With Best Regards,
Andy Shevchenko