netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Paul Stewart <pstew@chromium.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH] usbnet: Resubmit interrupt URB more often
Date: Tue, 19 Apr 2011 18:11:06 +0100	[thread overview]
Message-ID: <1303233066.2988.14.camel@bwh-desktop> (raw)
In-Reply-To: <20110419164703.5A6A82052B@glenhelen.mtv.corp.google.com>

On Tue, 2011-04-19 at 09:35 -0700, Paul Stewart wrote:
[...]
> index 4342bd9..e4dbb29 100644
> --- a/drivers/usb/core/urb.c
> +++ b/drivers/usb/core/urb.c
> @@ -295,7 +295,9 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
>  	struct usb_host_endpoint	*ep;
>  	int				is_out;
>  
> -	if (!urb || urb->hcpriv || !urb->complete)
> +	if (urb->hcpriv)
> +		return -EALREADY;
> +	if (!urb || !urb->complete)
>  		return -EINVAL;
[...]

The test for !urb must come before the test on urb->hcpriv.

Also, the kernel coding style does not allow '//' comments.  Please use
scripts/checkpatch.pl to check for style and other common errors.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2011-04-19 17:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 16:35 [PATCH] usbnet: Resubmit interrupt URB more often Paul Stewart
2011-04-19 17:11 ` Ben Hutchings [this message]
2011-04-19 17:44   ` [PATCHv2] " Paul Stewart
2011-04-20  8:24     ` David Miller
     [not found]       ` <20110420182234.GB8143@kroah.com>
     [not found]         ` <Pine.LNX.4.44L0.1104201252010.2159-100000@iolanthe.rowland.org>
     [not found]           ` <20110420.012431.104074243.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-04-19 17:44             ` [PATCHv3] usbnet: Resubmit interrupt URB once if halted Paul Stewart
2011-04-19 17:44           ` [PATCHv4] " Paul Stewart
2011-04-20 21:08             ` Alan Stern
     [not found]               ` <Pine.LNX.4.44L0.1104201658280.1686-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2011-04-20 21:17                 ` Paul Stewart
     [not found]                   ` <BANLkTi=N3T-V8VNOcbKu6COKvbEHqMoAog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-19 17:44                     ` Paul Stewart
     [not found]                       ` <20110420214452.C599321126-6A69KNNYBwgF248FYctl9mCaruZE5nAUZeezCHUQhQ4@public.gmane.org>
2011-04-21 14:03                         ` Alan Stern
2011-04-21 14:58                           ` Paul Stewart
2011-04-21 16:27                             ` Alan Stern
2011-04-21 20:00                           ` Oliver Neukum
     [not found]                             ` <201104212200.26551.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2011-04-21 21:40                               ` Alan Stern
2011-04-21 13:43                   ` Alan Stern
     [not found]                     ` <Pine.LNX.4.44L0.1104210937360.1939-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2011-04-21 14:44                       ` Paul Stewart
2011-04-19 17:51   ` [PATCH] usbnet: Resubmit interrupt URB more often Paul Stewart

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=1303233066.2988.14.camel@bwh-desktop \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pstew@chromium.org \
    /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;
as well as URLs for NNTP newsgroup(s).