Fixes for OF_MDIO flag
Subsystems (3)
cover Fixes for OF_MDIO flag
Hello
There are some residual drivers that check the CONFIG_OF_MDIO flag using the if defs. Using this check does not work when the OF_MDIO is configured as a module. Using the IS_ENABLED macro checks if the flag is declared as built-in or as a module.
Dan
Dan Murphy (4):
net: dp83869: Fix OF_MDIO config check
net: dp83867: Fix OF_MDIO config check
net: marvell: Fix OF_MDIO config check
net: mscc: Fix OF_MDIO config check
drivers/net/phy/dp83867.c | 2 +- drivers/net/phy/dp83869.c | 2 +- drivers/net/phy/marvell.c | 2 +- drivers/net/phy/mscc/mscc.h | 2 +- drivers/net/phy/mscc/mscc_main.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/4 net: dp83869: Fix OF_MDIO config check
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.
--- drivers/net/phy/dp83869.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/dp83869.c +1 -1
@@ -176,7 +176,7 @@ static int dp83869_set_strapped_mode(struct phy_device *phydev)return 0 ; } -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED (CONFIG_OF_MDIO )static int dp83869_of_init (struct phy_device *phydev) {struct dp83869_private *dp83869 = phydev->priv;
Signature · 1 line
2.26.2
Re: [PATCH net 1/4] net: dp83869: Fix OF_MDIO config check
Quoted 6 lines · Dan Murphy
When
CONFIG_OF_MDIOis set to be a module the code block is not compiled. Use theIS_ENABLEDmacro that checks for both built in as well as module.Fixes 01db923e83779 ("net: phy: dp83869: Add TI dp83869 phy")Signed-off-by Dan Murphy <[email protected]>
Signature · 1 line
Florian
PATCH 2/4 net: dp83867: Fix OF_MDIO config check
In reply to Dan MurphyWhen 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.
--- drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/dp83867.c +1 -1
@@ -488,7 +488,7 @@ static int dp83867_verify_rgmii_cfg(struct phy_device *phydev)return 0 ; } -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED (CONFIG_OF_MDIO )static int dp83867_of_init (struct phy_device *phydev) {struct dp83867_private *dp83867 = phydev->priv;
Signature · 1 line
2.26.2
Re: [PATCH net 2/4] net: dp83867: Fix OF_MDIO config check
Quoted 6 lines · Dan Murphy
When
CONFIG_OF_MDIOis set to be a module the code block is not compiled. Use theIS_ENABLEDmacro that checks for both built in as well as module.Fixes 2a10154abcb75 ("net: phy: dp83867: Add TI dp83867 phy")Signed-off-by Dan Murphy <[email protected]>
Signature · 1 line
Florian
PATCH 3/4 net: marvell: Fix OF_MDIO config check
In reply to Dan MurphyWhen 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.
--- drivers/net/phy/marvell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/marvell.c +1 -1
@@ -429,7 +429,7 @@ static int m88e1101_config_aneg(struct phy_device *phydev)return marvell_config_aneg (phydev); } -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED (CONFIG_OF_MDIO )/* Set and/or override some configuration registers based on the * marvell,reg-init property stored in the of_node for the phydev. *
Signature · 1 line
2.26.2
Re: [PATCH net 3/4] net: marvell: Fix OF_MDIO config check
Quoted 6 lines · Dan Murphy
When
CONFIG_OF_MDIOis set to be a module the code block is not compiled. Use theIS_ENABLEDmacro that checks for both built in as well as module.Fixes cf41a51db8985 ("of/phylib: Use device tree properties to initialize Marvell PHYs.")Signed-off-by Dan Murphy <[email protected]>
Signature · 1 line
Florian
PATCH 4/4 net: mscc: Fix OF_MDIO config check
In reply to Dan MurphyWhen 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.
--- drivers/net/phy/mscc/mscc.h | 2 +- drivers/net/phy/mscc/mscc_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/phy/mscc/mscc.h +1 -1
@@ -374,7 +374,7 @@ struct vsc8531_private {#endif }; -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED(CONFIG_OF_MDIO) struct vsc8531_edge_rate_table { u32 vddmac; u32 slowdown[8];
drivers/net/phy/mscc/mscc_main.c +2 -2
@@ -98,7 +98,7 @@ static const struct vsc85xx_hw_stat vsc8584_hw_stats[] = { }, }; -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED (CONFIG_OF_MDIO )static const struct vsc8531_edge_rate_table edge_table[] = { {MSCC_VDDMAC_3300 , {0 ,2 ,4 ,7 ,10 ,17 ,29 ,53 } }, {MSCC_VDDMAC_2500, { 0, 3, 6, 10, 14, 23, 37, 63} },
@@ -382,7 +382,7 @@ static void vsc85xx_wol_get(struct phy_device *phydev,mutex_unlock (&phydev->lock); } -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED (CONFIG_OF_MDIO )static int vsc85xx_edge_rate_magic_get (struct phy_device *phydev) {u32 vdd, sd;
Signature · 1 line
2.26.2
Re: [PATCH net 4/4] net: mscc: Fix OF_MDIO config check
Quoted 6 lines · Dan Murphy
When
CONFIG_OF_MDIOis set to be a module the code block is not compiled. Use theIS_ENABLEDmacro that checks for both built in as well as module.Fixes 4f58e6dceb0e4 ("net: phy: Cleanup the Edge-Rate feature in Microsemi PHYs.")Signed-off-by Dan Murphy <[email protected]>
Signature · 1 line
Florian
David Miller
maintainerFrom: Dan Murphy <[email protected]>
Date: Fri, 5 Jun 2020 09:01:03 -0500
Quoted 4 lines
There are some residual drivers that check the
CONFIG_OF_MDIOflag using the if defs. Using this check does not work when theOF_MDIOis configured as a module. Using theIS_ENABLEDmacro checks if the flag is declared as built-in or as a module.
Series applied, thank you.