Re: [PATCH net-next 1/1] net: mdio: reset PHY before attempting to access ID register

Andrew Lunn
2025-11-27T15:56:27Z

> c) what about using EXPORT_SYMBOL_FOR_MODULES() on the problematic
> functions? Are there any objections against it?
> This type of export is rarely used in the kernel, so I am uncertain
> about that. Is using it on functions declared in private headers
> also discouraged?

Rather than _FOR_MODULES, how about using a namespace.

https://docs.kernel.org/core-api/symbol-namespaces.html#how-to-use-symbols-exported-in-namespaces

Add a name space "NET_PHY_CORE_ONLY", and put these symbols into that
name space. We should notice any driver importing that namespace and
reject it.

Andrew