Re: [PATCH v2 1/1] iio: core: Simplify IIO core managed APIs

From: Andy Shevchenko

Date: Sun Feb 22 2026 - 14:07:29 EST


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.)

--
With Best Regards,
Andy Shevchenko