Commit d1a16dbb authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski
Browse files

net: phylink: remove switch() statement in resolve handling



The switch() statement doesn't sit very well with the preceeding if()
statements, so let's just convert everything to if()s. As a result of
the two preceding commits, there is now only one case in the switch()
statement. Remove the switch statement and reduce the code indentation.
Code reformatting will be in the following commit.

Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1t9RQu-002Fez-AA@rmk-PC.armlinux.org.uk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f0f46c2a
Loading
Loading
Loading
Loading
+45 −49
Original line number Diff line number Diff line
@@ -1470,8 +1470,6 @@ static void phylink_resolve(struct work_struct *w)
		link_state = pl->phy_state;
		mac_config = link_state.link;
	} else {
		switch (pl->cur_link_an_mode) {
		case MLO_AN_INBAND:
		phylink_mac_pcs_get_state(pl, &link_state);

		/* The PCS may have a latching link-fail indicator.
@@ -1523,8 +1521,6 @@ static void phylink_resolve(struct work_struct *w)
			link_state.pause = pl->phy_state.pause;
			mac_config = true;
		}
			break;
		}
	}

	if (pl->cur_link_an_mode != MLO_AN_FIXED)