]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: felix: use DSA port iteration helpers
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 16 Feb 2022 14:30:09 +0000 (16:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Feb 2022 14:06:51 +0000 (14:06 +0000)
commita4dbdc46c01c8ddb827e32d5d9c5e3c29fdf1875
tree4bc568b481ff49ea897f33ea2eda60d3d8a906e5
parentecd91d2ed511314c2430878391061fdb821beb89
net: dsa: felix: use DSA port iteration helpers

Use the helpers that avoid the quadratic complexity associated with
calling dsa_to_port() indirectly: dsa_is_unused_port(),
dsa_is_cpu_port().

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