lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1010191056470.1786-100000@iolanthe.rowland.org>
Date:	Tue, 19 Oct 2010 11:08:17 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Tatyana Brokhman <tlinder@...eaurora.org>
cc:	USB list <linux-usb@...r.kernel.org>,
	<linux-arm-msm@...r.kernel.org>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/2] usb: dummy_hcd code simplification

On Tue, 19 Oct 2010, Tatyana Brokhman wrote:

> Take handling of the control requests out from dummy_timer to a different
> function.
> 
> Signed-off-by: Tatyana Brokhman <tlinder@...eaurora.org>
> ---
>  drivers/usb/gadget/dummy_hcd.c |  250 +++++++++++++++++++++-------------------
>  1 files changed, 134 insertions(+), 116 deletions(-)
> 
> diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
> index dc65462..ff93fea 100644
> --- a/drivers/usb/gadget/dummy_hcd.c
> +++ b/drivers/usb/gadget/dummy_hcd.c
> @@ -1195,6 +1195,138 @@ static struct dummy_ep *find_endpoint (struct dummy *dum, u8 address)
>  #define Ep_Request	(USB_TYPE_STANDARD | USB_RECIP_ENDPOINT)
>  #define Ep_InRequest	(Ep_Request | USB_DIR_IN)
>  
> +
> +/**
> + * handle_control_request() - handles all control transferes
> + *

There should not be a blank line here.

> + * @dum - pointer to dummy (the_controller)
> + * @urb - the urb request to handle

Where's the line for "setup"?

> + * @status - pointer to request handling status

In each of these there should be a ':' following the variable name,
not a space and a '-'.  Honestly, I can't see why you have so much
trouble copying the format of existing kerneldoc entries.

> + *
> + * Return 0 - if the request was handled
> + *	  1 - if the request wasn't handles
> + *	  error code on error
> + */
> +static int handle_control_request(struct dummy *dum, struct urb *urb,
> +				  struct usb_ctrlrequest setup,

Don't pass "setup" by value!  Pass it by reference, i.e., pass a 
pointer to the "setup" variable in dummy_timer().

> +				  int *status)
> +{

The rest of this is okay.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ