[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170725084558.GB2860@kwain>
Date: Tue, 25 Jul 2017 10:45:58 +0200
From: Antoine Tenart <antoine.tenart@...e-electrons.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: Antoine Tenart <antoine.tenart@...e-electrons.com>,
davem@...emloft.net, jason@...edaemon.net, andrew@...n.ch,
gregory.clement@...e-electrons.com,
sebastian.hesselbarth@...il.com,
thomas.petazzoni@...e-electrons.com, nadavh@...vell.com,
linux@...linux.org.uk, mw@...ihalf.com, stefanc@...vell.com,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next 09/18] net: mvpp2: use named interrupts
Hi Sergei,
On Mon, Jul 24, 2017 at 07:49:03PM +0300, Sergei Shtylyov wrote:
> On 07/24/2017 04:48 PM, Antoine Tenart wrote:
> > + if (of_get_property(port_node, "interrupt-names", NULL)) {
> > + port->irq = of_irq_get_byname(port_node, "rx-shared");
> > + if (port->irq <= 0) {
> > + err = (port->irq == -EPROBE_DEFER) ?
> > + -EPROBE_DEFER : -EINVAL;
>
> Perhaps better:
>
> err = port->irq ?: -EINVAL;
Sure.
> > + goto err_free_netdev;
> > + }
> > + } else {
> > + /* kept for dt compatibility */
> > + port->irq = irq_of_parse_and_map(port_node, 0);
> > + if (port->irq <= 0) {
>
> Note that irq_of_parse_and_map() returns *unsigned int*, so negative
> error codes are not possible, 0 indicates bad IRQ.
That right, I'll fix that!
Thanks,
Antoine
--
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists