1 From f0f46c2a3d8ea9d1427298c8103a777d9e616c29 Mon Sep 17 00:00:00 2001
2 From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
3 Date: Fri, 8 Nov 2024 16:01:55 +0000
4 Subject: [PATCH 3/5] net: phylink: move MLO_AN_PHY resolve handling to if()
7 The switch() statement doesn't sit very well with the preceeding if()
8 statements, and results in excessive indentation that spoils code
9 readability. Continue cleaning this up by converting the MLO_AN_PHY
10 case to use an if() statmeent.
12 Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
13 Link: https://patch.msgid.link/E1t9RQp-002Fet-5W@rmk-PC.armlinux.org.uk
14 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
16 drivers/net/phy/phylink.c | 8 +++-----
17 1 file changed, 3 insertions(+), 5 deletions(-)
19 --- a/drivers/net/phy/phylink.c
20 +++ b/drivers/net/phy/phylink.c
21 @@ -1432,13 +1432,11 @@ static void phylink_resolve(struct work_
22 } else if (pl->cur_link_an_mode == MLO_AN_FIXED) {
23 phylink_get_fixed_state(pl, &link_state);
24 mac_config = link_state.link;
25 + } else if (pl->cur_link_an_mode == MLO_AN_PHY) {
26 + link_state = pl->phy_state;
27 + mac_config = link_state.link;
29 switch (pl->cur_link_an_mode) {
31 - link_state = pl->phy_state;
32 - mac_config = link_state.link;
36 phylink_mac_pcs_get_state(pl, &link_state);