[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKxU2N-VHmVerombZ77uOHApi0aGBFi46oC1eoGTm5sakCVc4w@mail.gmail.com>
Date: Mon, 11 Nov 2024 20:10:04 -0800
From: Rosen Penev <rosenp@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Marc Kleine-Budde <mkl@...gutronix.de>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Florian Fainelli <florian.fainelli@...adcom.com>,
Vladimir Oltean <olteanv@...il.com>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>, Samuel Holland <samuel@...lland.org>,
Pantelis Antoniou <pantelis.antoniou@...il.com>, Marcin Wojtas <marcin.s.wojtas@...il.com>,
Byungho An <bh74.an@...sung.com>, Kevin Brace <kevinbrace@...cecomputerlab.com>,
Francois Romieu <romieu@...zoreil.com>, Michal Simek <michal.simek@....com>,
Heiner Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>,
Zhao Qiang <qiang.zhao@....com>,
"open list:CAN NETWORK DRIVERS" <linux-can@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>,
"moderated list:ARM/Allwinner sunXi SoC support" <linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/Allwinner sunXi SoC support" <linux-sunxi@...ts.linux.dev>,
"open list:FREESCALE SOC FS_ENET DRIVER" <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCHv2 net-next] net: use pdev instead of OF funcs
On Mon, Nov 11, 2024 at 7:32 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon, 11 Nov 2024 13:03:16 -0800 Rosen Penev wrote:
> > --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
> > +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c
> > @@ -111,7 +111,7 @@ static int sxgbe_platform_probe(struct platform_device *pdev)
> > }
> >
> > /* Get the SXGBE common INT information */
> > - priv->irq = irq_of_parse_and_map(node, 0);
> > + priv->irq = platform_get_irq(pdev, 0);
> > if (priv->irq <= 0) {
> > dev_err(dev, "sxgbe common irq parsing failed\n");
> > goto err_drv_remove;
> > @@ -122,7 +122,7 @@ static int sxgbe_platform_probe(struct platform_device *pdev)
> >
> > /* Get the TX/RX IRQ numbers */
> > for (i = 0, chan = 1; i < SXGBE_TX_QUEUES; i++) {
> > - priv->txq[i]->irq_no = irq_of_parse_and_map(node, chan++);
> > + priv->txq[i]->irq_no = platform_get_irq(pdev, chan++);
> > if (priv->txq[i]->irq_no <= 0) {
> > dev_err(dev, "sxgbe tx irq parsing failed\n");
> > goto err_tx_irq_unmap;
> > @@ -130,14 +130,14 @@ static int sxgbe_platform_probe(struct platform_device *pdev)
> > }
> >
> > for (i = 0; i < SXGBE_RX_QUEUES; i++) {
> > - priv->rxq[i]->irq_no = irq_of_parse_and_map(node, chan++);
> > + priv->rxq[i]->irq_no = platform_get_irq(pdev, chan++);
> > if (priv->rxq[i]->irq_no <= 0) {
> > dev_err(dev, "sxgbe rx irq parsing failed\n");
> > goto err_rx_irq_unmap;
> > }
> > }
> >
> > - priv->lpi_irq = irq_of_parse_and_map(node, chan);
> > + priv->lpi_irq = platform_get_irq(pdev, chan);
> > if (priv->lpi_irq <= 0) {
> > dev_err(dev, "sxgbe lpi irq parsing failed\n");
> > goto err_rx_irq_unmap;
>
> Coccicheck wants you to drop the errors:
>
> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:116:2-9: line 116 is redundant because platform_get_irq() already prints an error
> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:127:3-10: line 127 is redundant because platform_get_irq() already prints an error
> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:135:3-10: line 135 is redundant because platform_get_irq() already prints an error
> drivers/net/ethernet/samsung/sxgbe/sxgbe_platform.c:142:2-9: line 142 is redundant because platform_get_irq() already prints an error
I looked at the output. The error checks need changing too.
>
> You can make it a separate patch in a series, for clarity.
I don't think it's enough to warrant its own commit.
> --
> pw-bot: cr
Powered by blists - more mailing lists