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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Nov 2011 16:08:35 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Tonylijo <mail@...ylijo.in>
CC:	Felipe Balbi <balbi@...com>, Greg Kroah-Hartman <gregkh@...e.de>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb : gadget : usbstring : fix style problems

Hello.

On 16-11-2011 8:43, Tonylijo wrote:

> Minor fixes for problems found by checkpatch.pl in usbstring.c.

> Signed-off-by: Tonylijo Jose<mail@...ylijo.in>
> ---
> diff --git a/drivers/usb/gadget/usbstring.c
> b/drivers/usb/gadget/usbstring.c
> index 58c4d37..2bdc56a 100644
> --- a/drivers/usb/gadget/usbstring.c
> +++ b/drivers/usb/gadget/usbstring.c
[...]
> @@ -102,17 +104,17 @@ fail:
>    * characters (which are also widely used in C strings).
>    */
>   int
> -usb_gadget_get_string (struct usb_gadget_strings *table, int id, u8
> *buf)
> +usb_gadget_get_string(struct usb_gadget_strings *table, int id, u8
> *buf)

    The patch was line-wrapped by your mailer. Seems easy to fix though...

> @@ -124,13 +126,13 @@ usb_gadget_get_string (struct usb_gadget_strings
> *table, int id, u8 *buf)
>   		return -EINVAL;
>
>   	/* string descriptors have length, tag, then UTF16-LE text */
> -	len = min ((size_t) 126, strlen (s->s));
> -	memset (buf + 2, 0, 2 * len);	/* zero all the bytes */
> +	len = min((size_t) 126, strlen(s->s));

    Worth converting to min_t() probably...

WBR, Sergei
--
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