All checks were successful
target_linux_generic / Update target_linux_generic (openwrt-25.12) (push) Successful in 8s
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
From f0f46c2a3d8ea9d1427298c8103a777d9e616c29 Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Fri, 8 Nov 2024 16:01:55 +0000
|
|
Subject: [PATCH 3/5] 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) <rmk+kernel@armlinux.org.uk>
|
|
Link: https://patch.msgid.link/E1t9RQp-002Fet-5W@rmk-PC.armlinux.org.uk
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
---
|
|
drivers/net/phy/phylink.c | 8 +++-----
|
|
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/phy/phylink.c
|
|
+++ b/drivers/net/phy/phylink.c
|
|
@@ -1483,13 +1483,11 @@ static void phylink_resolve(struct work_
|
|
} 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);
|
|
|