Re: [RFC] staging: media: atomisp: change copy_from_compatible to iov_iter

From: Andy Shevchenko

Date: Tue Apr 07 2026 - 11:14:56 EST


On Tue, Apr 07, 2026 at 06:06:33PM +0300, Andy Shevchenko wrote:
> On Tue, Apr 07, 2026 at 04:46:49PM +0200, Joshua Crofts wrote:
>
> > I've had some spare time and looked at the copy_from_compatible function
> > in pci/atomisp_cmd.c. You've recommended checking out the korg1212 driver
> > and patch for adding iov_iter support. What I find strange is that the korg1212
> > driver already expects to receive the userspace data in the form of iov_iter,
> > meanwhile atomisp expects a from and to pointer along with a boolean
> > whether it's coming from the kernel or userspace. My question is whether
> > you meant this as a local fix where I'd use an iov_iter in the atomisp_cmd.c
> > file (maybe separating the functions to user/kernel, since I don't
> > really like the
> > passing of the from_user boolean)
>
> iov_iter has a type that implies the user or kernel buffer.
>
> > or if you were hinting to a ground-up
> > rebuild of the underlying atomisp architecture (which is definitely a tedious
> > task, looking at the source code).
>
> I believe the second (latter) option. The code has to be revisited to convert
> using iov_iter and drop the custom code.

FWIW, the core part of the sound change is here
cf393babb37a ("ALSA: pcm: Add copy ops with iov_iter")

> > Thanks for your time.
>
> Thanks for looking into that!

--
With Best Regards,
Andy Shevchenko