diff mbox series

[CFT,net-next,2/2] net: axienet: replace mdiobus_write() with mdiodev_write()

Message ID E1mxqBm-00GWxu-8y@rmk-PC.armlinux.org.uk (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series net: axienet: modernise pcs implementation | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/checkpatch warning WARNING: Unknown commit id '197a68ef1837', maybe rebased or not pulled?
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Russell King (Oracle) Dec. 16, 2021, 12:48 p.m. UTC
Commit 197a68ef1837 ("net: mdio: Add helper functions for accessing
MDIO devices") added support for mdiodev accessor operations that
neatly wrap the mdiobus accessor operations. Since we are dealing with
a mdio device here, update the driver to use mdiodev_write().

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jakub Kicinski Dec. 16, 2021, 3:14 p.m. UTC | #1
On Thu, 16 Dec 2021 12:48:50 +0000 Russell King (Oracle) wrote:
> Commit 197a68ef1837 ("net: mdio: Add helper functions for accessing
> MDIO devices") added support for mdiodev accessor operations that

Nit: wrong commit id, 0ebecb2644c8 ("net: mdio: Add helper functions for
accessing MDIO devices")?
diff mbox series

Patch

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 5edc8ec72317..ac23d1c65ac8 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1543,8 +1543,7 @@  static int axienet_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
 	if (!lp->switch_x_sgmii)
 		return 0;
 
-	ret = mdiobus_write(pcs_phy->bus, pcs_phy->addr,
-			    XLNX_MII_STD_SELECT_REG,
+	ret = mdiodev_write(pcs_phy, XLNX_MII_STD_SELECT_REG,
 			    interface == PHY_INTERFACE_MODE_SGMII ?
 				XLNX_MII_STD_SELECT_SGMII : 0);
 	if (ret < 0) {