netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: roel.kluin@gmail.com
Cc: ben@decadent.org.uk, netdev@vger.kernel.org,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: eepro testing positive EBUSY return by request_irq()?
Date: Mon, 03 Jan 2011 11:37:26 -0800 (PST)	[thread overview]
Message-ID: <20110103.113726.246525147.davem@davemloft.net> (raw)
In-Reply-To: <4D209127.5080505@gmail.com>

From: roel kluin <roel.kluin@gmail.com>
Date: Sun, 02 Jan 2011 15:52:23 +0100

> +		for (i = 0; i < ARRAY_SIZE(irqlist); i++) {
> +			retval = request_irq (irqlist[i], NULL, 0, "bogus", NULL);
> +			if (retval != -EBUSY)
> +				continue;
> +			if (retval < 0)
> +				goto out;
> +			dev->irq = irqlist[i];
> +			break;

This series of tests don't make much sense.

If we get to the "retval < 0" check, retval must be -EBUSY.  So at
best it's superfluous, at worst it's confusing.

      parent reply	other threads:[~2011-01-03 19:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-31 14:47 [PATCH] net: eepro testing positive EBUSY return by request_irq()? roel kluin
2010-12-31 15:27 ` Ben Hutchings
2011-01-02 14:52   ` roel kluin
2011-01-02 19:51     ` Ben Hutchings
2011-01-03 19:37     ` David Miller [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=20110103.113726.246525147.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=ben@decadent.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=roel.kluin@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;
as well as URLs for NNTP newsgroup(s).