lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241111193222.00ae2f3e@kernel.org>
Date: Mon, 11 Nov 2024 19:32:22 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Rosen Penev <rosenp@...il.com>
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>, linux-can@...r.kernel.org (open list:CAN NETWORK
 DRIVERS), linux-kernel@...r.kernel.org (open list),
 linux-arm-kernel@...ts.infradead.org (moderated list:ARM/Allwinner sunXi
 SoC support), linux-sunxi@...ts.linux.dev (open list:ARM/Allwinner sunXi
 SoC support), linuxppc-dev@...ts.ozlabs.org (open list:FREESCALE SOC
 FS_ENET DRIVER)
Subject: Re: [PATCHv2 net-next] net: use pdev instead of OF funcs

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

You can make it a separate patch in a series, for clarity.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ