]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: realtek: create rtl8211f_config_phy_eee() helper
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 17 Nov 2025 23:40:33 +0000 (01:40 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 04:24:23 +0000 (20:24 -0800)
commit4465ae435ddc0162d5033a543658449d53d46d08
tree20013666d1a81b9043588d1a16e340621ef5f6a5
parentbb78b71faf60d11a15f07e3390fcfd31e5e523bb
net: phy: realtek: create rtl8211f_config_phy_eee() helper

To simplify the rtl8211f_config_init() control flow and get rid of
"early" returns for PHYs where the PHYCR2 register is absent, move the
entire logic sub-block that deals with disabling PHY-mode EEE to a
separate function. There, it is much more obvious what the early
"return 0" skips, and it becomes more difficult to accidentally skip
unintended stuff.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251117234033.345679-7-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/realtek/realtek_main.c