aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King (Oracle) <[email protected]>2024-11-08 16:01:55 +0000
committerJakub Kicinski <[email protected]>2024-11-11 19:05:14 -0800
commitf0f46c2a3d8ea9d1427298c8103a777d9e616c29 (patch)
tree5ad228307ebd19159a01044e8f3456b670d13d12
parent92abfcb4ced482afbe65d18980e6734fe1e62a34 (diff)
net: phylink: move MLO_AN_PHY resolve handling to if() statement
The switch() statement doesn't sit very well with the preceeding if() statements, and results in excessive indentation that spoils code readability. Continue cleaning this up by converting the MLO_AN_PHY case to use an if() statmeent. Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/phy/phylink.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index bb20ae5674e5..3af6368a9fbf 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1466,13 +1466,11 @@ static void phylink_resolve(struct work_struct *w)
} else if (pl->cur_link_an_mode == MLO_AN_FIXED) {
phylink_get_fixed_state(pl, &link_state);
mac_config = link_state.link;
+ } else if (pl->cur_link_an_mode == MLO_AN_PHY) {
+ link_state = pl->phy_state;
+ mac_config = link_state.link;
} else {
switch (pl->cur_link_an_mode) {
- case MLO_AN_PHY:
- link_state = pl->phy_state;
- mac_config = link_state.link;
- break;
-
case MLO_AN_INBAND:
phylink_mac_pcs_get_state(pl, &link_state);