netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Nicolas Pitre <nico@fluxnic.net>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: smc91x: propagate irq return code
Date: Mon, 1 Feb 2016 23:55:14 +0300	[thread overview]
Message-ID: <56AFC632.8070507@cogentembedded.com> (raw)
In-Reply-To: <87twls5fkk.fsf@belgarion.home>

On 02/01/2016 11:41 PM, Robert Jarzmik wrote:

>>> The smc91x driver doesn't honor the probe deferral mechanism when the
>>> interrupt source is not yet available, such as one provided by a gpio
>>> controller not probed.

>>     What if 'ndev->irq' does equal 0?

> That's not possible AFAIR.

    Possible if of_irq_get() returns 0 (and it will on failure!).

> There was a discussion where Linus had stated that the irq is a cookie, and a 0
> value is "no interrupt", expcepting for the single case of a PC and its timer
> interrupt.

    I know, I know... and even on x86 it was never passed to request_irq(), 
only to setup_irq()...

> As we're not in that case, and up to my understanding, platform_get_irq() cannot
> return a 0 value, only a strictly negative or positive one.

    Wishful thinking...

> And yet, that test now looks weird to me. I think I'll respin the patch with a
> "if (ndev->irq < 0) {" instead of the "if (ndev->irq <= 0) {".

    Defeating Linus' PoV as a result... ;-)

> Cheers.

MBR, Sergei

  reply	other threads:[~2016-02-01 20:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-31 22:46 [PATCH] net: smc91x: propagate irq return code Robert Jarzmik
2016-02-01 12:36 ` Sergei Shtylyov
2016-02-01 20:41   ` Robert Jarzmik
2016-02-01 20:55     ` Sergei Shtylyov [this message]
2016-02-01 21:02       ` Robert Jarzmik

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=56AFC632.8070507@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=robert.jarzmik@free.fr \
    /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).