]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: avoid one dsa_to_port() in dsa_slave_change_mtu
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 15 Apr 2022 15:46:24 +0000 (18:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Apr 2022 09:34:34 +0000 (10:34 +0100)
commit5247cc24561b0c6722924e477b4ac8f02bae1399
treef508d0dc3acdbf057544fd3aaf521853624f2331
parentb6813fd0af12ac02d5cc5635696446b0cff6646b
net: dsa: avoid one dsa_to_port() in dsa_slave_change_mtu

We could retrieve the cpu_dp pointer directly from the "dp" we already
have, no need to resort to dsa_to_port(ds, port).

This change also removes the need for an "int port", so that is also
deleted.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c