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
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 -
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
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