From: Heiner Kallweit Date: Wed, 6 Nov 2024 20:24:18 +0000 (+0100) Subject: net: phy: broadcom: use genphy_c45_an_config_eee_aneg in bcm_config_lre_aneg X-Git-Tag: v6.13-rc1~135^2~106^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3cc97d2fa9876d30ff5a2665211cf11daf01beeb;p=thirdparty%2Fkernel%2Flinux.git net: phy: broadcom: use genphy_c45_an_config_eee_aneg in bcm_config_lre_aneg bcm_config_lre_aneg() is the only user of genphy_config_eee_advert(), therefore use genphy_c45_an_config_eee_aneg() instead. The resulting functionality is equivalent, and bcm_config_lre_aneg() follows the structure of __genphy_config_aneg(). In a follow-up step genphy_config_eee_advert() can be removed. Note: We preserve the current behavior to ignore errors. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/6e5cd4ab-28bb-4d82-b449-fec85f3d1e8a@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/phy/bcm-phy-lib.c b/drivers/net/phy/bcm-phy-lib.c index 59c2c6acc134b..5198d66dbbc04 100644 --- a/drivers/net/phy/bcm-phy-lib.c +++ b/drivers/net/phy/bcm-phy-lib.c @@ -1136,7 +1136,7 @@ int bcm_config_lre_aneg(struct phy_device *phydev, bool changed) { int err; - if (genphy_config_eee_advert(phydev)) + if (genphy_c45_an_config_eee_aneg(phydev) > 0) changed = true; err = bcm_setup_lre_master_slave(phydev);