[PATCH net] net: dp83822: Fix OF_MDIO config check

Johannes Schneider posted 1 patch 7 months, 3 weeks ago
There is a newer version of this series
drivers/net/phy/dp83822.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH net] net: dp83822: Fix OF_MDIO config check
Posted by Johannes Schneider 7 months, 3 weeks ago
When CONFIG_OF_MDIO is set to be a module the code block is not
compiled. Use the IS_ENABLED macro that checks for both built in as
well as module.

Fixes: 5dc39fd ("net: phy: DP83822: Add ability to advertise Fiber connection")
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
---
 drivers/net/phy/dp83822.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c
index 6599feca1967..f1179881abb4 100644
--- a/drivers/net/phy/dp83822.c
+++ b/drivers/net/phy/dp83822.c
@@ -719,7 +719,7 @@ static int dp83822_phy_reset(struct phy_device *phydev)
 	return phydev->drv->config_init(phydev);
 }
 
-#ifdef CONFIG_OF_MDIO
+#if IS_ENABLED(CONFIG_OF_MDIO)
 static int dp83822_of_init_leds(struct phy_device *phydev)
 {
 	struct device_node *node = phydev->mdio.dev.of_node;
-- 
2.34.1
Re: [PATCH net] net: dp83822: Fix OF_MDIO config check
Posted by Maxime Chevallier 7 months, 3 weeks ago
Hello Johannes,

On Tue, 22 Apr 2025 08:36:38 +0200
Johannes Schneider <johannes.schneider@leica-geosystems.com> wrote:

> When CONFIG_OF_MDIO is set to be a module the code block is not
> compiled. Use the IS_ENABLED macro that checks for both built in as
> well as module.
> 
> Fixes: 5dc39fd ("net: phy: DP83822: Add ability to advertise Fiber connection")
> Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
> ---

The patch looks correct, but doesn't apply. Have you correctly rebased
it on the latest net tree ?

Thanks,

Maxime