Re: [PATCH] include: mdio: Guard inline function with CONFIG_MDIO
From: Andrew Lunn
Date: Mon Nov 04 2024 - 08:50:02 EST
On Mon, Nov 04, 2024 at 05:09:50PM +1000, Alistair Francis wrote:
> The static inline functions mdio45_ethtool_gset() and
> mdio45_ethtool_ksettings_get() call mdio45_ethtool_gset_npage() and
> mdio45_ethtool_ksettings_get_npage() which are both guarded by
> CONFIG_MDIO. So let's only expose mdio45_ethtool_gset() and
> mdio45_ethtool_ksettings_get() if CONFIG_MDIO is defined.
Why? Are you fixing a linker error? A compiler error?
In general, we don't want #ifdef if they are not necessary, because
they reduce the effectiveness of build testing.
Andrew