From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752747AbcHVH4p (ORCPT ); Mon, 22 Aug 2016 03:56:45 -0400 Received: from mga07.intel.com ([134.134.136.100]:54989 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbcHVHzf (ORCPT ); Mon, 22 Aug 2016 03:55:35 -0400 X-Greylist: delayed 579 seconds by postgrey-1.27 at vger.kernel.org; Mon, 22 Aug 2016 03:55:35 EDT X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,558,1464678000"; d="asc'?scan'208";a="159236522" From: Felipe Balbi To: John Youn , "Felipe F. Tonello" , "linux-usb\@vger.kernel.org" Cc: "linux-kernel\@vger.kernel.org" , Michal Nazarewicz Subject: Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() In-Reply-To: <6a4fcb3c-7c75-257d-24d5-3c7b8e0f056f@synopsys.com> References: <20160808203013.19283-1-eu@felipetonello.com> <20160808203013.19283-11-eu@felipetonello.com> <6a4fcb3c-7c75-257d-24d5-3c7b8e0f056f@synopsys.com> User-Agent: Notmuch/0.22.1+63~g994277e (https://notmuchmail.org) Emacs/25.1.1 (x86_64-pc-linux-gnu) Date: Mon, 22 Aug 2016 10:45:49 +0300 Message-ID: <87r39hi6vm.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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(). >>=20 >> Signed-off-by: Felipe F. Tonello >> --- >> drivers/usb/gadget/function/f_hid.c | 6 +----- >> 1 file changed, 1 insertion(+), 5 deletions(-) >>=20 >> diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/fu= nction/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) >>=20=20 >> /* preallocate request and buffer */ >> status =3D -ENOMEM; >> - hidg->req =3D usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL); >> + hidg->req =3D alloc_ep_req(hidg->in_ep, hidg->report_length); >> if (!hidg->req) >> goto fail; >>=20=20 >> - hidg->req->buf =3D kmalloc(hidg->report_length, GFP_KERNEL); >> - if (!hidg->req->buf) >> - goto fail; >> - >> /* set descriptor dynamic values */ >> hidg_interface_desc.bInterfaceSubClass =3D hidg->bInterfaceSubClass; >> hidg_interface_desc.bInterfaceProtocol =3D hidg->bInterfaceProtocol; >>=20 > > Hi Felipe, > > This commit on your testing/next breaks compilation. > > ../drivers/usb/gadget/function/f_hid.c: In function =E2=80=98hidg_bind=E2= =80=99: > ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments t= o function =E2=80=98alloc_ep_req=E2=80=99 > hidg->req =3D 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 defa= ult_len); true that :-) Dropping from my queue. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJXuq2tAAoJEIaOsuA1yqRE4UIP/iR19JH/zYuIqPZHqfq9bHdB u/K2+4wxgMMKiSRAQeqGABWiA038KMlP76r4b+aHTHjmyaJZUnkVziClbNWlFtmo A7pi3Aiyk2KewZgXpss5+3xDYQvWyc56EQhHjXEHLokDK1WUILTPS7oW6gSY2rt7 sbxWfVGzLAEHO4frys8Xe5i8d+YGMnUWoZxA0rkbUlTkTmDVtLrGWN2wOAYbmkC+ gpzB1u1Eo0GzlOr/gHnTNe7qr8V0qyO9JzodW4pYqsaRRpvcKxY4/8FKiylhVDgL LAot6JULtXpC5Z9XvKiVdmJ8lWapKriccVik3vOYFRuP+bTRfz684cVz1PJ+3C1L u5ANpMk1KforKjj9+ULOddySGmYvRt4/9AK59wpUSDYZV5j4+zisv/ThCCiU4odk +ucmTaZQNINbQxAVRF334AL4HtFlwiZv9QcHKfrBrUL8EPCHCuOzJO+KYKg8wExR U9bb3tJQSirgcHLiPNkGey1yFIO3gQW1wCAzJEm+99Aut1kYN1mcyMLJ1e0oGO4I dgLXvECJng3t/auCXNPizI5JLLcPJC9y1wYelI2w56XzSPnXihNjemQPi/B8yd+r jH/M1RWuIhqSHRiN16/9jWpeDlBUANPHOX+zxNH7P2DNGUpsnSd6r2F/uHAk2A/x q0hYbRFFmnbAMlpoPQRO =w2BI -----END PGP SIGNATURE----- --=-=-=--