Subject: Re: [PATCH net-next v3 05/11] net: phy: Create SFP phy_port before registering usptream

From: Simon Horman <[email-masked]>
Date: Mon, 9 Feb 2026 16:25:03 +0000

On Tue, Feb 03, 2026 at 07:09:23PM +0100, Maxime Chevallier wrote:
> Hi Simon,
> 
> On 03/02/2026 18:52, Simon Horman wrote:
> 
> >> -	if (!ret && phydev->sfp_bus)
> >> -		ret = phy_setup_sfp_port(phydev);
> >> +	ret = sfp_bus_add_upstream(bus, phydev, &sfp_phydev_ops);
> >> +	sfp_bus_put(bus);
> >> +
> >> +	if (ret && port) {
> > 
> > Hi Maxime,
> > 
> > If bus is NULL then port will not be set here.
> 
> Arg... I though smatch was running in the NIPA ingst-mdir script, but I
> was wrong :(

FWWIW, I think it would be nice if it did.
But I'm also not sure how well it works when applied to a full
allmodconfig build. Which, AFAIK, is how NIPA tends to run.

> 
> I'll address that in V5 as the problme is still in V4, thank you for the
> report
> 
> Maxime
> 
> 
>