Commit 7bf588dc authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski
Browse files

net: phylink: simplify phylink_resolve() -> phylink_major_config() path



This is a trivial change with no functional effect which replaces the
pattern:

if (a) {
	if (b) {
		do_stuff();
	}
}

with:

if (a && b) {
	do_stuff();
};

The purpose is to reduce the delta of a subsequent functional change.

Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20260119121954.1624535-2-vladimir.oltean@nxp.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 331cf8fc
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -1684,10 +1684,9 @@ static void phylink_resolve(struct work_struct *w)
	if (pl->act_link_an_mode != MLO_AN_FIXED)
		phylink_apply_manual_flow(pl, &link_state);

	if (mac_config) {
		if (link_state.interface != pl->link_config.interface) {
			/* The interface has changed, force the link down and
			 * then reconfigure.
	if (mac_config && link_state.interface != pl->link_config.interface) {
		/* The interface has changed, so force the link down and then
		 * reconfigure.
		 */
		if (cur_link_state) {
			phylink_link_down(pl);
@@ -1696,7 +1695,6 @@ static void phylink_resolve(struct work_struct *w)
		phylink_major_config(pl, false, &link_state);
		pl->link_config.interface = link_state.interface;
	}
	}

	/* If configuration of the interface failed, force the link down
	 * until we get a successful configuration.