[PATCH 3/4] usb: gadget: u_uac1: add __user annotation

2013-08-04 Thread Jingoo Han
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

Signed-off-by: Jingoo Han jg1@samsung.com
---
 drivers/usb/gadget/u_uac1.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/usb/gadget/u_uac1.c
index c7d460f..7a55fea 100644
--- a/drivers/usb/gadget/u_uac1.c
+++ b/drivers/usb/gadget/u_uac1.c
@@ -191,7 +191,7 @@ try_again:
frames = bytes_to_frames(runtime, count);
old_fs = get_fs();
set_fs(KERNEL_DS);
-   result = snd_pcm_lib_write(snd-substream, buf, frames);
+   result = snd_pcm_lib_write(snd-substream, (void __user *)buf, frames);
if (result != frames) {
ERROR(card, Playback error: %d\n, (int)result);
set_fs(old_fs);
-- 
1.7.10.4


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] usb: gadget: u_uac1: add __user annotation

2013-08-04 Thread Jassi Brar
On 5 August 2013 08:44, Jingoo Han jg1@samsung.com wrote:
 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

 Signed-off-by: Jingoo Han jg1@samsung.com

Acked-by: Jassi Brar jaswinder.si...@linaro.org

 ---
  drivers/usb/gadget/u_uac1.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/usb/gadget/u_uac1.c
 index c7d460f..7a55fea 100644
 --- a/drivers/usb/gadget/u_uac1.c
 +++ b/drivers/usb/gadget/u_uac1.c
 @@ -191,7 +191,7 @@ try_again:
 frames = bytes_to_frames(runtime, count);
 old_fs = get_fs();
 set_fs(KERNEL_DS);
 -   result = snd_pcm_lib_write(snd-substream, buf, frames);
 +   result = snd_pcm_lib_write(snd-substream, (void __user *)buf, 
 frames);
 if (result != frames) {
 ERROR(card, Playback error: %d\n, (int)result);
 set_fs(old_fs);
 --
 1.7.10.4





-- 
Linaro.org │ Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106  -
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html