Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: u_uac1: add __user annotation

Added __user annotation to fix the following sparse warning.

drivers/usb/gadget/u_uac1.c:194:52: warning: incorrect type in argument 2 (different address spaces)
drivers/usb/gadget/u_uac1.c:194:52: expected void const [noderef] <asn:1>*buf
drivers/usb/gadget/u_uac1.c:194:52: got void *buf

Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Jingoo Han and committed by
Felipe Balbi
2419831c bf19647d

+1 -1
+1 -1
drivers/usb/gadget/u_uac1.c
··· 191 191 frames = bytes_to_frames(runtime, count); 192 192 old_fs = get_fs(); 193 193 set_fs(KERNEL_DS); 194 - result = snd_pcm_lib_write(snd->substream, buf, frames); 194 + result = snd_pcm_lib_write(snd->substream, (void __user *)buf, frames); 195 195 if (result != frames) { 196 196 ERROR(card, "Playback error: %d\n", (int)result); 197 197 set_fs(old_fs);