Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-23 Thread Felipe Ferreri Tonello
Hi Balbi,

On 23/08/16 12:03, Felipe Balbi wrote:
> 
> Hi,
> 
> Felipe Ferreri Tonello  writes:
>>> John Youn  writes:
 On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
> Use gadget's framework allocation function instead of directly calling
> usb_ep_alloc_request().
>
> Signed-off-by: Felipe F. Tonello 
> ---
>  drivers/usb/gadget/function/f_hid.c | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_hid.c 
> b/drivers/usb/gadget/function/f_hid.c
> index a010496e4e05..89d2e9a5a04f 100644
> --- a/drivers/usb/gadget/function/f_hid.c
> +++ b/drivers/usb/gadget/function/f_hid.c
> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
> struct usb_function *f)
>  
>   /* preallocate request and buffer */
>   status = -ENOMEM;
> - hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
> + hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>   if (!hidg->req)
>   goto fail;
>  
> - hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
> - if (!hidg->req->buf)
> - goto fail;
> -
>   /* set descriptor dynamic values */
>   hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>   hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
>

 Hi Felipe,

 This commit on your testing/next breaks compilation.

 ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
 ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
 function ‘alloc_ep_req’
   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
   ^
 In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
 ../drivers/usb/gadget/u_f.h:63:21: note: declared here
  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
 default_len);
>>>
>>> true that :-) Dropping from my queue.
>>>
>>
>> Are you applying the previous patches? Specially that this is the last
>> patch in the series, how can it break with you if it doesn't break here?
>> What should I do then?
> 
> Can you rebase your series on top of my testing/next? My HEAD is
> at commit 95bbb3474f1e87c9ec7ebe2acf25006e5e94a824.

It was at that time. I will rebease it then on v5. Just waiting for your
comments on the other thread.

Thanks

-- 
Felipe


0x92698E6A.asc
Description: application/pgp-keys


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-23 Thread Felipe Ferreri Tonello
Hi Balbi,

On 23/08/16 12:03, Felipe Balbi wrote:
> 
> Hi,
> 
> Felipe Ferreri Tonello  writes:
>>> John Youn  writes:
 On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
> Use gadget's framework allocation function instead of directly calling
> usb_ep_alloc_request().
>
> Signed-off-by: Felipe F. Tonello 
> ---
>  drivers/usb/gadget/function/f_hid.c | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_hid.c 
> b/drivers/usb/gadget/function/f_hid.c
> index a010496e4e05..89d2e9a5a04f 100644
> --- a/drivers/usb/gadget/function/f_hid.c
> +++ b/drivers/usb/gadget/function/f_hid.c
> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
> struct usb_function *f)
>  
>   /* preallocate request and buffer */
>   status = -ENOMEM;
> - hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
> + hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>   if (!hidg->req)
>   goto fail;
>  
> - hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
> - if (!hidg->req->buf)
> - goto fail;
> -
>   /* set descriptor dynamic values */
>   hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>   hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
>

 Hi Felipe,

 This commit on your testing/next breaks compilation.

 ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
 ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
 function ‘alloc_ep_req’
   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
   ^
 In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
 ../drivers/usb/gadget/u_f.h:63:21: note: declared here
  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
 default_len);
>>>
>>> true that :-) Dropping from my queue.
>>>
>>
>> Are you applying the previous patches? Specially that this is the last
>> patch in the series, how can it break with you if it doesn't break here?
>> What should I do then?
> 
> Can you rebase your series on top of my testing/next? My HEAD is
> at commit 95bbb3474f1e87c9ec7ebe2acf25006e5e94a824.

It was at that time. I will rebease it then on v5. Just waiting for your
comments on the other thread.

Thanks

-- 
Felipe


0x92698E6A.asc
Description: application/pgp-keys


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-23 Thread Felipe Balbi

Hi,

Felipe Ferreri Tonello  writes:
>> John Youn  writes:
>>> On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
 Use gadget's framework allocation function instead of directly calling
 usb_ep_alloc_request().

 Signed-off-by: Felipe F. Tonello 
 ---
  drivers/usb/gadget/function/f_hid.c | 6 +-
  1 file changed, 1 insertion(+), 5 deletions(-)

 diff --git a/drivers/usb/gadget/function/f_hid.c 
 b/drivers/usb/gadget/function/f_hid.c
 index a010496e4e05..89d2e9a5a04f 100644
 --- a/drivers/usb/gadget/function/f_hid.c
 +++ b/drivers/usb/gadget/function/f_hid.c
 @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
 struct usb_function *f)
  
/* preallocate request and buffer */
status = -ENOMEM;
 -  hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
 +  hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
if (!hidg->req)
goto fail;
  
 -  hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
 -  if (!hidg->req->buf)
 -  goto fail;
 -
/* set descriptor dynamic values */
hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;

>>>
>>> Hi Felipe,
>>>
>>> This commit on your testing/next breaks compilation.
>>>
>>> ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
>>> ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
>>> function ‘alloc_ep_req’
>>>   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>>   ^
>>> In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
>>> ../drivers/usb/gadget/u_f.h:63:21: note: declared here
>>>  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
>>> default_len);
>> 
>> true that :-) Dropping from my queue.
>> 
>
> Are you applying the previous patches? Specially that this is the last
> patch in the series, how can it break with you if it doesn't break here?
> What should I do then?

Can you rebase your series on top of my testing/next? My HEAD is
at commit 95bbb3474f1e87c9ec7ebe2acf25006e5e94a824.

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-23 Thread Felipe Balbi

Hi,

Felipe Ferreri Tonello  writes:
>> John Youn  writes:
>>> On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
 Use gadget's framework allocation function instead of directly calling
 usb_ep_alloc_request().

 Signed-off-by: Felipe F. Tonello 
 ---
  drivers/usb/gadget/function/f_hid.c | 6 +-
  1 file changed, 1 insertion(+), 5 deletions(-)

 diff --git a/drivers/usb/gadget/function/f_hid.c 
 b/drivers/usb/gadget/function/f_hid.c
 index a010496e4e05..89d2e9a5a04f 100644
 --- a/drivers/usb/gadget/function/f_hid.c
 +++ b/drivers/usb/gadget/function/f_hid.c
 @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
 struct usb_function *f)
  
/* preallocate request and buffer */
status = -ENOMEM;
 -  hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
 +  hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
if (!hidg->req)
goto fail;
  
 -  hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
 -  if (!hidg->req->buf)
 -  goto fail;
 -
/* set descriptor dynamic values */
hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;

>>>
>>> Hi Felipe,
>>>
>>> This commit on your testing/next breaks compilation.
>>>
>>> ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
>>> ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
>>> function ‘alloc_ep_req’
>>>   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>>   ^
>>> In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
>>> ../drivers/usb/gadget/u_f.h:63:21: note: declared here
>>>  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
>>> default_len);
>> 
>> true that :-) Dropping from my queue.
>> 
>
> Are you applying the previous patches? Specially that this is the last
> patch in the series, how can it break with you if it doesn't break here?
> What should I do then?

Can you rebase your series on top of my testing/next? My HEAD is
at commit 95bbb3474f1e87c9ec7ebe2acf25006e5e94a824.

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-23 Thread Felipe Ferreri Tonello
Hi,

On 22/08/16 08:45, Felipe Balbi wrote:
> 
> Hi,
> 
> John Youn  writes:
>> On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
>>> Use gadget's framework allocation function instead of directly calling
>>> usb_ep_alloc_request().
>>>
>>> Signed-off-by: Felipe F. Tonello 
>>> ---
>>>  drivers/usb/gadget/function/f_hid.c | 6 +-
>>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/usb/gadget/function/f_hid.c 
>>> b/drivers/usb/gadget/function/f_hid.c
>>> index a010496e4e05..89d2e9a5a04f 100644
>>> --- a/drivers/usb/gadget/function/f_hid.c
>>> +++ b/drivers/usb/gadget/function/f_hid.c
>>> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
>>> struct usb_function *f)
>>>  
>>> /* preallocate request and buffer */
>>> status = -ENOMEM;
>>> -   hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
>>> +   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>> if (!hidg->req)
>>> goto fail;
>>>  
>>> -   hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
>>> -   if (!hidg->req->buf)
>>> -   goto fail;
>>> -
>>> /* set descriptor dynamic values */
>>> hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>>> hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
>>>
>>
>> Hi Felipe,
>>
>> This commit on your testing/next breaks compilation.
>>
>> ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
>> ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
>> function ‘alloc_ep_req’
>>   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>   ^
>> In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
>> ../drivers/usb/gadget/u_f.h:63:21: note: declared here
>>  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
>> default_len);
> 
> true that :-) Dropping from my queue.
> 

Are you applying the previous patches? Specially that this is the last
patch in the series, how can it break with you if it doesn't break here?
What should I do then?

Thanks

-- 
Felipe


0x92698E6A.asc
Description: application/pgp-keys


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-23 Thread Felipe Ferreri Tonello
Hi,

On 22/08/16 08:45, Felipe Balbi wrote:
> 
> Hi,
> 
> John Youn  writes:
>> On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
>>> Use gadget's framework allocation function instead of directly calling
>>> usb_ep_alloc_request().
>>>
>>> Signed-off-by: Felipe F. Tonello 
>>> ---
>>>  drivers/usb/gadget/function/f_hid.c | 6 +-
>>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/usb/gadget/function/f_hid.c 
>>> b/drivers/usb/gadget/function/f_hid.c
>>> index a010496e4e05..89d2e9a5a04f 100644
>>> --- a/drivers/usb/gadget/function/f_hid.c
>>> +++ b/drivers/usb/gadget/function/f_hid.c
>>> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
>>> struct usb_function *f)
>>>  
>>> /* preallocate request and buffer */
>>> status = -ENOMEM;
>>> -   hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
>>> +   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>> if (!hidg->req)
>>> goto fail;
>>>  
>>> -   hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
>>> -   if (!hidg->req->buf)
>>> -   goto fail;
>>> -
>>> /* set descriptor dynamic values */
>>> hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>>> hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
>>>
>>
>> Hi Felipe,
>>
>> This commit on your testing/next breaks compilation.
>>
>> ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
>> ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
>> function ‘alloc_ep_req’
>>   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>   ^
>> In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
>> ../drivers/usb/gadget/u_f.h:63:21: note: declared here
>>  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
>> default_len);
> 
> true that :-) Dropping from my queue.
> 

Are you applying the previous patches? Specially that this is the last
patch in the series, how can it break with you if it doesn't break here?
What should I do then?

Thanks

-- 
Felipe


0x92698E6A.asc
Description: application/pgp-keys


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-22 Thread Felipe Balbi

Hi,

John Youn  writes:
> On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
>> Use gadget's framework allocation function instead of directly calling
>> usb_ep_alloc_request().
>> 
>> Signed-off-by: Felipe F. Tonello 
>> ---
>>  drivers/usb/gadget/function/f_hid.c | 6 +-
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>> 
>> diff --git a/drivers/usb/gadget/function/f_hid.c 
>> b/drivers/usb/gadget/function/f_hid.c
>> index a010496e4e05..89d2e9a5a04f 100644
>> --- a/drivers/usb/gadget/function/f_hid.c
>> +++ b/drivers/usb/gadget/function/f_hid.c
>> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
>> struct usb_function *f)
>>  
>>  /* preallocate request and buffer */
>>  status = -ENOMEM;
>> -hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
>> +hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>  if (!hidg->req)
>>  goto fail;
>>  
>> -hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
>> -if (!hidg->req->buf)
>> -goto fail;
>> -
>>  /* set descriptor dynamic values */
>>  hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>>  hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
>> 
>
> Hi Felipe,
>
> This commit on your testing/next breaks compilation.
>
> ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
> ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
> function ‘alloc_ep_req’
>   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>   ^
> In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
> ../drivers/usb/gadget/u_f.h:63:21: note: declared here
>  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
> default_len);

true that :-) Dropping from my queue.

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-22 Thread Felipe Balbi

Hi,

John Youn  writes:
> On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
>> Use gadget's framework allocation function instead of directly calling
>> usb_ep_alloc_request().
>> 
>> Signed-off-by: Felipe F. Tonello 
>> ---
>>  drivers/usb/gadget/function/f_hid.c | 6 +-
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>> 
>> diff --git a/drivers/usb/gadget/function/f_hid.c 
>> b/drivers/usb/gadget/function/f_hid.c
>> index a010496e4e05..89d2e9a5a04f 100644
>> --- a/drivers/usb/gadget/function/f_hid.c
>> +++ b/drivers/usb/gadget/function/f_hid.c
>> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
>> struct usb_function *f)
>>  
>>  /* preallocate request and buffer */
>>  status = -ENOMEM;
>> -hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
>> +hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>>  if (!hidg->req)
>>  goto fail;
>>  
>> -hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
>> -if (!hidg->req->buf)
>> -goto fail;
>> -
>>  /* set descriptor dynamic values */
>>  hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>>  hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
>> 
>
> Hi Felipe,
>
> This commit on your testing/next breaks compilation.
>
> ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
> ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
> function ‘alloc_ep_req’
>   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>   ^
> In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
> ../drivers/usb/gadget/u_f.h:63:21: note: declared here
>  struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
> default_len);

true that :-) Dropping from my queue.

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-19 Thread John Youn
On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
> Use gadget's framework allocation function instead of directly calling
> usb_ep_alloc_request().
> 
> Signed-off-by: Felipe F. Tonello 
> ---
>  drivers/usb/gadget/function/f_hid.c | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_hid.c 
> b/drivers/usb/gadget/function/f_hid.c
> index a010496e4e05..89d2e9a5a04f 100644
> --- a/drivers/usb/gadget/function/f_hid.c
> +++ b/drivers/usb/gadget/function/f_hid.c
> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
> struct usb_function *f)
>  
>   /* preallocate request and buffer */
>   status = -ENOMEM;
> - hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
> + hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>   if (!hidg->req)
>   goto fail;
>  
> - hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
> - if (!hidg->req->buf)
> - goto fail;
> -
>   /* set descriptor dynamic values */
>   hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>   hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
> 

Hi Felipe,

This commit on your testing/next breaks compilation.

../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
function ‘alloc_ep_req’
  hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
  ^
In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
../drivers/usb/gadget/u_f.h:63:21: note: declared here
 struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
default_len);
 ^

Regards,
John


Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-19 Thread John Youn
On 8/8/2016 1:30 PM, Felipe F. Tonello wrote:
> Use gadget's framework allocation function instead of directly calling
> usb_ep_alloc_request().
> 
> Signed-off-by: Felipe F. Tonello 
> ---
>  drivers/usb/gadget/function/f_hid.c | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_hid.c 
> b/drivers/usb/gadget/function/f_hid.c
> index a010496e4e05..89d2e9a5a04f 100644
> --- a/drivers/usb/gadget/function/f_hid.c
> +++ b/drivers/usb/gadget/function/f_hid.c
> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, 
> struct usb_function *f)
>  
>   /* preallocate request and buffer */
>   status = -ENOMEM;
> - hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
> + hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
>   if (!hidg->req)
>   goto fail;
>  
> - hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
> - if (!hidg->req->buf)
> - goto fail;
> -
>   /* set descriptor dynamic values */
>   hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
>   hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
> 

Hi Felipe,

This commit on your testing/next breaks compilation.

../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’:
../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to 
function ‘alloc_ep_req’
  hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
  ^
In file included from ../drivers/usb/gadget/function/f_hid.c:24:0:
../drivers/usb/gadget/u_f.h:63:21: note: declared here
 struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int 
default_len);
 ^

Regards,
John


[PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-08 Thread Felipe F. Tonello
Use gadget's framework allocation function instead of directly calling
usb_ep_alloc_request().

Signed-off-by: Felipe F. Tonello 
---
 drivers/usb/gadget/function/f_hid.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/function/f_hid.c 
b/drivers/usb/gadget/function/f_hid.c
index a010496e4e05..89d2e9a5a04f 100644
--- a/drivers/usb/gadget/function/f_hid.c
+++ b/drivers/usb/gadget/function/f_hid.c
@@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, struct 
usb_function *f)
 
/* preallocate request and buffer */
status = -ENOMEM;
-   hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
+   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
if (!hidg->req)
goto fail;
 
-   hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
-   if (!hidg->req->buf)
-   goto fail;
-
/* set descriptor dynamic values */
hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
-- 
2.9.2



[PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()

2016-08-08 Thread Felipe F. Tonello
Use gadget's framework allocation function instead of directly calling
usb_ep_alloc_request().

Signed-off-by: Felipe F. Tonello 
---
 drivers/usb/gadget/function/f_hid.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/function/f_hid.c 
b/drivers/usb/gadget/function/f_hid.c
index a010496e4e05..89d2e9a5a04f 100644
--- a/drivers/usb/gadget/function/f_hid.c
+++ b/drivers/usb/gadget/function/f_hid.c
@@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, struct 
usb_function *f)
 
/* preallocate request and buffer */
status = -ENOMEM;
-   hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL);
+   hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length);
if (!hidg->req)
goto fail;
 
-   hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL);
-   if (!hidg->req->buf)
-   goto fail;
-
/* set descriptor dynamic values */
hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
-- 
2.9.2