public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Felipe Ferreri Tonello <eu@felipetonello.com>,
	John Youn <John.Youn@synopsys.com>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: "linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michal Nazarewicz <mina86@mina86.com>
Subject: Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req()
Date: Tue, 23 Aug 2016 14:03:23 +0300	[thread overview]
Message-ID: <87y43nhhms.fsf@linux.intel.com> (raw)
In-Reply-To: <35182515-2a5b-1efa-564c-0ba38016520d@felipetonello.com>

[-- Attachment #1: Type: text/plain, Size: 2333 bytes --]


Hi,

Felipe Ferreri Tonello <eu@felipetonello.com> writes:
>> John Youn <John.Youn@synopsys.com> 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 <eu@felipetonello.com>
>>>> ---
>>>>  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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

  reply	other threads:[~2016-08-23 11:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 20:30 [PATCH v4 00/10] Gadget endpoint request allocation and MIDI Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 01/10] usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 02/10] usb: gadget: change len to size_t on alloc_ep_req() Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 03/10] usb: gadget: align buffer size when allocating for OUT endpoint Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 04/10] usb: gadget: f_midi: remove alignment code " Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 05/10] usb: gadget: f_midi: defaults buflen sizes to 512 Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 06/10] usb: gadget: f_midi: refactor state machine Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 07/10] usb: gadget: f_midi: drop substreams when disabling endpoint Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 08/10] usb: gadget: remove useless parameter in alloc_ep_req() Felipe F. Tonello
2016-08-18  7:12   ` Felipe Balbi
2016-08-23 10:18     ` Felipe Ferreri Tonello
2016-08-23 11:01       ` Felipe Balbi
2016-08-23 11:33         ` Felipe Ferreri Tonello
2016-08-29  7:55           ` Felipe Balbi
2016-08-30 16:13             ` Felipe Ferreri Tonello
2016-08-08 20:30 ` [PATCH v4 09/10] usb: gadget: f_hid: use free_ep_req() Felipe F. Tonello
2016-08-08 20:30 ` [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() Felipe F. Tonello
2016-08-19 19:07   ` John Youn
2016-08-22  7:45     ` Felipe Balbi
2016-08-23 10:20       ` Felipe Ferreri Tonello
2016-08-23 11:03         ` Felipe Balbi [this message]
2016-08-23 11:34           ` Felipe Ferreri Tonello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y43nhhms.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=John.Youn@synopsys.com \
    --cc=eu@felipetonello.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mina86@mina86.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox