]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hdsp: Make the firmware loading ioctl a bit more readable
authorTakashi Iwai <tiwai@suse.de>
Sun, 2 Feb 2020 09:07:24 +0000 (10:07 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 2 Feb 2020 09:08:33 +0000 (10:08 +0100)
commitd49ae99cf0a1aa8cf00a48f6e698bfbfa93533a5
tree099e01cd31d44f3dfecdc5b1eb5551f50681b6e9
parent96021ae1f112f513d193dfc30477319e6b61e0f6
ALSA: hdsp: Make the firmware loading ioctl a bit more readable

The firmware loading ioctl that is implemented for hdsp hwdep device
takes the reference of the address pointer, hence the current code is
rather confusing.  Also, due to the recent change in uapi header,
sparse also complains about the cast.

This patch tries to improve the readability by converting the
straightforward copy_from_user of the whole struct (which contains
only the pointer).

Fixes: 39ff8bddd7f7 ("ALSA: hdsp: Make uapi/hdsp.h compilable again")
Link: https://lore.kernel.org/r/20200202090724.18232-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/rme9652/hdsp.c