OSDN Git Service

net: dsa: use dsa_tree_for_each_cpu_port in dsa_tree_{setup,teardown}_master
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 19 Aug 2022 17:48:18 +0000 (20:48 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 23 Aug 2022 09:39:22 +0000 (11:39 +0200)
commit5dc760d1208200daaf49a2ff56a0e7dfa2d80bb2
tree9a2543f705e988ec3de185d539bc9ec1aee201ee
parentf41ec1fd1c20e2a4e60a4ab8490b3e63423c0a8a
net: dsa: use dsa_tree_for_each_cpu_port in dsa_tree_{setup,teardown}_master

More logic will be added to dsa_tree_setup_master() and
dsa_tree_teardown_master() in upcoming changes.

Reduce the indentation by one level in these functions by introducing
and using a dedicated iterator for CPU ports of a tree.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/dsa.h
net/dsa/dsa2.c