[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49cd4dbc073c3b8b1a5d9b2714d95a45b0d21a97.camel@alliedtelesis.co.nz>
Date: Mon, 16 Mar 2020 09:32:25 +0000
From: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To: "andrew@...n.ch" <andrew@...n.ch>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"josua@...id-run.com" <josua@...id-run.com>
Subject: Re: [PATCH v2] net: mvmdio: avoid error message for optional IRQ
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
Powered by blists - more mailing lists