]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: realtek: eliminate has_phycr2 variable
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 17 Nov 2025 23:40:30 +0000 (01:40 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Nov 2025 04:24:23 +0000 (20:24 -0800)
commit910ac7bfb1af1ae4cd141ef80e03a6729213c189
tree33459fddaceb1852bd02a3ec8b659ed5b6daae02
parent27033d06917758d47162581da7e9de8004049dee
net: phy: realtek: eliminate has_phycr2 variable

This variable is assigned in rtl821x_probe() and used in
rtl8211f_config_init(), which is more complex than it needs to be.
Simply testing the same condition from rtl821x_probe() in
rtl8211f_config_init() yields the same result (the PHY driver ID is a
runtime invariant), but with one temporary variable less.

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