]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dsa: convert dsa_user_phylink_fixed_state() to use dsa_phylink_to_port()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 12 Apr 2024 15:15:03 +0000 (16:15 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Apr 2024 09:48:41 +0000 (10:48 +0100)
Convert dsa_user_phylink_fixed_state() to use the newly introduced
dsa_phylink_to_port() helper.

Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/user.c

index 16d395bb1a1fef248fcf2ca6202210fa83e44c13..c94b868855aa1bcc163505553ecedee3cc21a5cb 100644 (file)
@@ -2445,7 +2445,7 @@ EXPORT_SYMBOL_GPL(dsa_port_phylink_mac_change);
 static void dsa_user_phylink_fixed_state(struct phylink_config *config,
                                         struct phylink_link_state *state)
 {
-       struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
+       struct dsa_port *dp = dsa_phylink_to_port(config);
        struct dsa_switch *ds = dp->ds;
 
        /* No need to check that this operation is valid, the callback would