Re: [PATCH net-next v1 1/5] net: mdiobus: Provide fwnode_mdiobus_register()

From: Andy Shevchenko

Date: Mon May 04 2026 - 10:41:49 EST


On Mon, May 04, 2026 at 11:16:00AM -0300, Victor Nogueira wrote:
> On 04/05/2026 04:29, Andy Shevchenko wrote:
> > Provide an agnostic helper to register MDIO bus independently on
> > the firmware node provider.

[...]

> > + if (is_of_node(fwnode))
> > + return __of_mdiobus_register(mdio, to_of_node(fwnode), owner);
>
> Build seems to break when CONFIG_OF_MDIO is not defined:
>
> drivers/net/mdio/fwnode_mdio.c: In function ‘__fwnode_mdiobus_register’:
> drivers/net/mdio/fwnode_mdio.c:198:24: error: implicit declaration of
> function ‘__of_mdiobus_register’; did you mean ‘of_mdiobus_register’?
> [-Wimplicit-function-declaration]
> 198 | return __of_mdiobus_register(mdio,
> to_of_node(fwnode), owner);

Ah, thanks for a good catch. I haven't checked OF case to be off.
Yeah, with __acpi_mdiobus_register the compiler sees the prototype
independently on the configuration option. I will think about OF
case (like I said it can also be hidden, the problem is that there
is a huge amount of users, that's why I haven't touched it).

--
With Best Regards,
Andy Shevchenko