net: phy: smsc: use phy_set_bits in smsc_phy_config_init
Subsystems (3)
Heiner Kallweit
maintainerPATCH 1/1 net: phy: smsc: use phy_set_bits in smsc_phy_config_init
Simplify the code by using phy_set_bits().
Signed-off-by Heiner Kallweit <[email protected]>
--- drivers/net/phy/smsc.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/net/phy/smsc.c +3 -10
@@ -107,20 +107,13 @@ static irqreturn_t smsc_phy_handle_interrupt(struct phy_device *phydev)static int smsc_phy_config_init (struct phy_device *phydev) {struct smsc_phy_priv *priv = phydev->priv; -int rc;if (!priv->energy_enable || phydev->irq !=PHY_POLL )return 0 ; - rc =phy_read (phydev,MII_LAN83C185_CTRL_STATUS ); - -if (rc <0 ) -return rc; - -/* Enable energy detect mode for this SMSC Transceivers */ - rc =phy_write (phydev,MII_LAN83C185_CTRL_STATUS , - rc |MII_LAN83C185_EDPWRDOWN ); -return rc; +/* Enable energy detect power down mode */ +return phy_set_bits (phydev,MII_LAN83C185_CTRL_STATUS , +MII_LAN83C185_EDPWRDOWN ); }static int smsc_phy_reset (struct phy_device *phydev)
Signature · 1 line
2.39.2
Quoted 3 lines · Heiner Kallweit
Simplify the code by using
phy_set_bits().Signed-off-by Heiner Kallweit <[email protected]>
Reviewed-by Simon Horman <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Wed, 8 Mar 2023 21:19:55 +0100 you wrote:
Simplify the code by using
phy_set_bits().Signed-off-by Heiner Kallweit <[email protected]>--- drivers/net/phy/smsc.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
Here is the summary with links:
- [net-next] net: phy: smsc: use phy_set_bits in smsc_phy_config_init
https://git.kernel.org/netdev/net-next/c/513bdd947388
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html