lkml.org 
[lkml]   [2023]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/25] ALSA: korg1212: Convert to generic PCM copy ops
On Mon, Aug 14, 2023 at 01:55:06PM +0200, Takashi Iwai wrote:
> This patch converts the korg1212 driver code to use the new unified
> PCM copy callback. The open-coded conditional memory copies are
> replaced with simpler copy_from/to_iter() calls.
>
> Note that copy_from/to_iter() returns the copied bytes, hence the
> error condition is inverted from copy_from/to_user().

...

> + if (!copy_to_iter(src, size, dst))

!= size ?


> return -EFAULT;

...

> + if (!copy_from_iter(dst, size, src))
> return -EFAULT;

Ditto.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-08-15 15:57    [W:0.456 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site