Re: [PATCH] usb: gadget: f_fs: use memdup_user

2017-05-20 Thread Al Viro
On Sat, May 13, 2017 at 11:05:30AM +0300, Dan Carpenter wrote: > > + data = memdup_user(buf, len); > > + if (unlikely(IS_ERR(data))) > > Don't use likely/unlikely() here. It's not a fast path. More to the point, #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long

Re: [PATCH] usb: gadget: f_fs: use memdup_user

2017-05-14 Thread Michal Nazarewicz
On Sat, May 13 2017, Geliang Tang wrote: > Use memdup_user() helper instead of open-coding to simplify the code. > > Signed-off-by: Geliang Tang Acked-by: Michal Nazarewicz > --- > drivers/usb/gadget/function/f_fs.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff -

Re: [PATCH] usb: gadget: f_fs: use memdup_user

2017-05-13 Thread Dan Carpenter
On Sat, May 13, 2017 at 11:15:59AM +0800, Geliang Tang wrote: > Use memdup_user() helper instead of open-coding to simplify the code. > > Signed-off-by: Geliang Tang > --- > drivers/usb/gadget/function/f_fs.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/d

[PATCH] usb: gadget: f_fs: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/usb/gadget/function/f_fs.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index