mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-23 20:01:47 -05:00
net: phylink: move MLO_AN_FIXED 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. Begin cleaning this up by converting the MLO_AN_FIXED case to an if() statement. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1t9RQk-002Fen-1A@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
8cc5f4cb94
commit
92abfcb4ce
@@ -1463,6 +1463,9 @@ static void phylink_resolve(struct work_struct *w)
|
||||
} else if (pl->mac_link_dropped) {
|
||||
link_state.link = false;
|
||||
retrigger = true;
|
||||
} else if (pl->cur_link_an_mode == MLO_AN_FIXED) {
|
||||
phylink_get_fixed_state(pl, &link_state);
|
||||
mac_config = link_state.link;
|
||||
} else {
|
||||
switch (pl->cur_link_an_mode) {
|
||||
case MLO_AN_PHY:
|
||||
@@ -1470,11 +1473,6 @@ static void phylink_resolve(struct work_struct *w)
|
||||
mac_config = link_state.link;
|
||||
break;
|
||||
|
||||
case MLO_AN_FIXED:
|
||||
phylink_get_fixed_state(pl, &link_state);
|
||||
mac_config = link_state.link;
|
||||
break;
|
||||
|
||||
case MLO_AN_INBAND:
|
||||
phylink_mac_pcs_get_state(pl, &link_state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user