netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Peter Korsgaard <jacmet@sunsite.dk>
Cc: David Brownell <david-b@pacbell.net>,
	netdev@vger.kernel.org, dbrownell@users.sourceforge.net
Subject: Re: [PATCH] Cleanup usbnet_probe() return value handling
Date: Tue, 10 Jul 2007 12:42:29 -0400	[thread overview]
Message-ID: <4693B6F5.6070603@garzik.org> (raw)
In-Reply-To: <87sl86juel.fsf@p4.be.48ers.dk>

Peter Korsgaard wrote:
>>>>>> "David" == David Brownell <david-b@pacbell.net> writes:
> 
> Hi,
> 
>  David> I'd rather see the later test updated to match this one.
>  David> (Good catch!)
> 
>  David> The return convention is "negative means error".  There's
>  David> code in USB which has multiple nonnegative success codes.
> 
> Ok, updated patch does that instead.
> 
>  David> In particular usb_control_msg(), which would very naturally
>  David> used as the body of a bind() method, returns negative or
>  David> the number of bytes transferred.
> 
> Yeah, that was the original problem in my dm9601 driver.
> 
> usbnet_probe() handles a positive return value from the driver bind()
> function as success, but will later only setup the status handler if the
> return value was zero, leading to confusion. Patch adjusts this to accept
> positive values as success in both checks.
> 
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
> ---
>  drivers/net/usb/usbnet.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied



      parent reply	other threads:[~2007-07-10 16:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-02 15:40 [PATCH] Cleanup usbnet_probe() return value handling Peter Korsgaard
2007-07-02 16:14 ` David Brownell
2007-07-02 22:46   ` Peter Korsgaard
2007-07-04  4:34     ` David Brownell
2007-07-10 16:42     ` Jeff Garzik [this message]

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=4693B6F5.6070603@garzik.org \
    --to=jeff@garzik.org \
    --cc=david-b@pacbell.net \
    --cc=dbrownell@users.sourceforge.net \
    --cc=jacmet@sunsite.dk \
    --cc=netdev@vger.kernel.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).