Skip to contentSkip to conversation

net: phy: at803x: fix at803x_match_phy_id mismatch

PATCH In review Arnd Bergmann 3 participants 3 messages Jul 21, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: at803x: fix at803x_match_phy_id mismatch

From: Arnd Bergmann <[email protected]>

There are two conflicting patches in net-next, one removed the at803x_get_features() function and the other added another user:

drivers/net/phy/at803x.c: In function 'at803x_get_features':
drivers/net/phy/at803x.c:706:14: error: implicit declaration of function 'at803x_match_phy_id' [-Werror=implicit-function-declaration]

Change the new caller over to an open-coded comparison as well.

Fixes 8887ca5474bd ("net: phy: at803x: simplify custom phy id matching")
Fixes b856150c8098 ("net: phy: at803x: mask 1000 Base-X link mode")
---
 drivers/net/phy/at803x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/at803x.c +1 -1
index 0790ffcd3db6..bdac087058b2 100644
@@ -703,7 +703,7 @@ static int at803x_get_features(struct phy_device *phydev)
 	if (err)
 		return err;
 
-	if (!at803x_match_phy_id(phydev, ATH8031_PHY_ID))
+	if (phydev->drv->phy_id != ATH8031_PHY_ID)
 		return 0;
 
 	/* AR8031/AR8033 have different status registers
Signature · 1 line
2.29.2
#1 lore raw
Quoted 4 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

There are two conflicting patches in net-next, one removed ...

The email subject was meant to include [net-next], sorry for missing that.

Arnd

#2 lore raw
In reply to Arnd Bergmann

Patch already sent by Vladimir, and just applied.

Quoted 35 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

There are two conflicting patches in net-next, one removed the at803x_get_features() function and the other added another user:

drivers/net/phy/at803x.c: In function 'at803x_get_features':
drivers/net/phy/at803x.c:706:14: error: implicit declaration of function 'at803x_match_phy_id' [-Werror=implicit-function-declaration]

Change the new caller over to an open-coded comparison as well.

Fixes 8887ca5474bd ("net: phy: at803x: simplify custom phy id matching")
Fixes b856150c8098 ("net: phy: at803x: mask 1000 Base-X link mode")
---
 drivers/net/phy/at803x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/at803x.c +1 -1
index 0790ffcd3db6..bdac087058b2 100644
@@ -703,7 +703,7 @@ static int at803x_get_features(struct phy_device *phydev)
 	if (err)
 		return err;
 
-	if (!at803x_match_phy_id(phydev, ATH8031_PHY_ID))
+	if (phydev->drv->phy_id != ATH8031_PHY_ID)
 		return 0;
 
 	/* AR8031/AR8033 have different status registers
Signature · 1 line
2.29.2
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!