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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250901152352.GG15473@horms.kernel.org>
Date: Mon, 1 Sep 2025 16:23:52 +0100
From: Simon Horman <horms@...nel.org>
To: Rosen Penev <rosenp@...il.com>
Cc: netdev@...r.kernel.org, Sunil Goutham <sgoutham@...vell.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	"moderated list:ARM/CAVIUM THUNDER NETWORK DRIVER" <linux-arm-kernel@...ts.infradead.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: thunder_bgx: use OF loop instead of fwnode

On Sat, Aug 30, 2025 at 02:42:17PM -0700, Rosen Penev wrote:
> The loop ends up converting fwnode to device_node anyway.
> 
> While at it, handle return value of of_get_mac_address in case of NVMEM.

I think that this part should be a separate patch.
Possibly targeted at net with a Fixes tag.

> 
> Simplify while loop iteration.
> 
> Signed-off-by: Rosen Penev <rosenp@...il.com>

...

> @@ -1514,14 +1510,13 @@ static int bgx_init_of_phy(struct bgx *bgx)
>  	/* We are bailing out, try not to leak device reference counts
>  	 * for phy devices we may have already found.
>  	 */
> -	while (lmac) {
> +	while (lmac--) {
>  		if (bgx->lmac[lmac].phydev) {
>  			put_device(&bgx->lmac[lmac].phydev->mdio.dev);
>  			bgx->lmac[lmac].phydev = NULL;
>  		}
> -		lmac--;
>  	}

The update to this look looks correct to me, even without the rest of
the patch separate. If so, I'm wondering if it should also be a separate
patch. Again, possibly for net with a Fixes tag.

> -	of_node_put(node);
> +	of_node_put(child);
>  	return -EPROBE_DEFER;
>  }

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ