public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Maxim Osipov <maxim.osipov@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: Fix kernel oops with g_ether and Windows
Date: Sat, 21 Aug 2010 17:27:44 +0400	[thread overview]
Message-ID: <4C6FD450.6040405@ru.mvista.com> (raw)
In-Reply-To: <AANLkTinKBYzMwxEJarwN_HmKAORqJ7oiauj5JuXCo+rm@mail.gmail.com>

Hello.

Maxim Osipov wrote:

> Please find attached patch for
> https://bugzilla.kernel.org/show_bug.cgi?id=16023 problem.

    It's preferrable that the patahces areposted inline.

> Kind regards,
> Maxim

> From 43568dec4f387da4562d5bc81557c642a468b685 Mon Sep 17 00:00:00 2001
> From: Maxim Osipov <maxim.osipov@gmail.com>
> Date: Thu, 19 Aug 2010 07:25:28 +0400
> Subject: [PATCH] USB: Fix kernel oops with g_ether and Windows

> Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>
[...]
> diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
> index 5c0d06c..1043da1 100644
> --- a/drivers/usb/gadget/rndis.c
> +++ b/drivers/usb/gadget/rndis.c
> @@ -292,9 +292,13 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
>  	/* mandatory */
>  	case OID_GEN_VENDOR_DESCRIPTION:
>  		pr_debug("%s: OID_GEN_VENDOR_DESCRIPTION\n", __func__);
> -		length = strlen (rndis_per_dev_params [configNr].vendorDescr);
> -		memcpy (outbuf,
> -			rndis_per_dev_params [configNr].vendorDescr, length);
> +		if ( rndis_per_dev_params [configNr].vendorDescr ) {

    There should be not space after ( and before ). Run your patches thru 
scripts/checkpatch.pl before submitting please.

> +			length = strlen (rndis_per_dev_params [configNr].vendorDescr);
> +			memcpy (outbuf,
> +				rndis_per_dev_params [configNr].vendorDescr, length);

    Should be no space before ( either and before [ too.

WBR, Sergei


  reply	other threads:[~2010-08-21 13:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-21 10:54 [PATCH] USB: Fix kernel oops with g_ether and Windows Maxim Osipov
2010-08-21 13:27 ` Sergei Shtylyov [this message]
2010-09-06 14:37 ` Gadiyar, Anand
2010-09-06 20:18   ` Greg KH
2010-09-07  9:55     ` Sergei Shtylyov
2010-09-07 10:12       ` Maxim Osipov
2010-09-07 10:48         ` Gadiyar, Anand
2010-09-07 21:29           ` Greg KH
2010-09-07 23:54             ` Mihai Donțu
2010-09-08  0:34               ` Greg KH
2011-10-12 23:31                 ` Aras Vaichas
2011-10-13  0:12                   ` Greg KH
2011-10-13  0:46                     ` Aras Vaichas

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=4C6FD450.6040405@ru.mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=maxim.osipov@gmail.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