[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7812014c-a77f-441c-bcab-36846a3037cf@lunn.ch>
Date: Mon, 2 Sep 2024 22:06:14 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Rosen Penev <rosenp@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, linux-kernel@...r.kernel.org,
jacob.e.keller@...el.com, horms@...nel.org, sd@...asysnail.net,
chunkeey@...il.com
Subject: Re: [PATCH 2/6] net: ibm: emac: manage emac_irq with devm
On Mon, Sep 02, 2024 at 11:15:11AM -0700, Rosen Penev wrote:
> It's the last to go in remove. Safe to let devm handle it.
>
> Also move request_irq to probe for clarity. It's removed in _remove not
> close.
>
> Use dev_err instead of printk. Handles names automatically.
>
> + /* Setup error IRQ handler */
> + err = devm_request_irq(&ofdev->dev, dev->emac_irq, emac_irq, 0, "EMAC", dev);
> + if (err) {
> + dev_err(&ofdev->dev, "failed to request IRQ %d", dev->emac_irq);
> + goto err_gone;
> + }
Is this an internal interrupt, or a GPIO? It could be it is done in
open because there is a danger the GPIO controller has not probed
yet. So here you might get an EPROBE_DEFFER, where as the much older
kernel this was written for might not of done, if just gave an error
had gave up. So dev_err_probe() might be better.
Andrew
Powered by blists - more mailing lists