LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
To: "andrew@lunn.ch" <andrew@lunn.ch>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"josua@solid-run.com" <josua@solid-run.com>
Subject: Re: [PATCH v2] net: mvmdio: avoid error message for optional IRQ
Date: Mon, 16 Mar 2020 09:32:25 +0000	[thread overview]
Message-ID: <49cd4dbc073c3b8b1a5d9b2714d95a45b0d21a97.camel@alliedtelesis.co.nz> (raw)
In-Reply-To: <20200316083800.GB8524@lunn.ch>

On Mon, 2020-03-16 at 09:38 +0100, Andrew Lunn wrote:
> > Actually on closer inspection I think this is wrong.
> > platform_get_irq_optional() will return -ENXIO if the irq is not
> > specified.
> 
> The _optional is then pointless. And different to all the other
> _optional functions which don't return an error if the property is
> not
> defined.
> 
> Are you really sure about this? I don't have the time right now to
> check.
> 

Regretabbly yes[1]. It caught me by surprise too. I only noticed when I
went to use a different board that used that driver. I think the
problem is that on some platforms 0 is a valid irq so it can't just be
used to indicate a missing interrupt.

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/platform.c#n138



      reply	other threads:[~2020-03-16  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 20:05 Chris Packham
2020-03-12  7:03 ` David Miller
2020-03-16  7:29 ` Chris Packham
2020-03-16  8:38   ` Andrew Lunn
2020-03-16  9:32     ` Chris Packham [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=49cd4dbc073c3b8b1a5d9b2714d95a45b0d21a97.camel@alliedtelesis.co.nz \
    --to=chris.packham@alliedtelesis.co.nz \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=josua@solid-run.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH v2] net: mvmdio: avoid error message for optional IRQ' \
    /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

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).