]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: Align the syntax of iov_iter helpers with standard ones
authorTakashi Iwai <tiwai@suse.de>
Mon, 30 Dec 2024 11:49:02 +0000 (12:49 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 30 Dec 2024 11:50:04 +0000 (12:50 +0100)
commit1b2ff639ff0cb999285d90c57d3f856b91c2aea6
tree3dd2b5a258c2ac10c5f499c4879d9aa308a0ca53
parent1e63e3c4f54cf4320b1651557542a5913ccb0c42
ALSA: Align the syntax of iov_iter helpers with standard ones

We introduced a couple of helpers for copying iomem over iov_iter, and
the functions were formed like the former copy_from/to_user(), and the
return value was adjusted to 0/-EFAULT, which made the code transition
a bit easier at that time.

OTOH, the standard copy_from/to_iter() functions have different
argument orders and the return value, and this difference can be
confusing.  It's not only confusing but dangerous; actually I did
write a wrong code due to that once :-<

For reducing the confusion, this patch changes the syntax of those
helpers to align with the standard copy_from/to_iter().  The argument
order is changed and the return value is the size of copied bytes.
The callers of those functions are updated accordingly, too.

Link: https://patch.msgid.link/20241230114903.4959-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/pcm.h
sound/core/memory.c
sound/pci/nm256/nm256.c
sound/pci/rme32.c
sound/pci/rme96.c
sound/soc/qcom/lpass-platform.c