Commit 0e8eb9a1 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: dsa: rename teardown_default_cpu to teardown_cpu_ports

There is nothing specific to having a default CPU port to what
dsa_tree_teardown_default_cpu() does. Even with multiple CPU ports,
it would do the same thing: iterate through the ports of this switch
tree and reset the ->cpu_dp pointer to NULL. So rename it accordingly.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fd75f57
...@@ -329,7 +329,7 @@ static int dsa_tree_setup_default_cpu(struct dsa_switch_tree *dst) ...@@ -329,7 +329,7 @@ static int dsa_tree_setup_default_cpu(struct dsa_switch_tree *dst)
return 0; return 0;
} }
static void dsa_tree_teardown_default_cpu(struct dsa_switch_tree *dst) static void dsa_tree_teardown_cpu_ports(struct dsa_switch_tree *dst)
{ {
struct dsa_port *dp; struct dsa_port *dp;
...@@ -927,7 +927,7 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst) ...@@ -927,7 +927,7 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
err = dsa_tree_setup_switches(dst); err = dsa_tree_setup_switches(dst);
if (err) if (err)
goto teardown_default_cpu; goto teardown_cpu_ports;
err = dsa_tree_setup_master(dst); err = dsa_tree_setup_master(dst);
if (err) if (err)
...@@ -947,8 +947,8 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst) ...@@ -947,8 +947,8 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
dsa_tree_teardown_master(dst); dsa_tree_teardown_master(dst);
teardown_switches: teardown_switches:
dsa_tree_teardown_switches(dst); dsa_tree_teardown_switches(dst);
teardown_default_cpu: teardown_cpu_ports:
dsa_tree_teardown_default_cpu(dst); dsa_tree_teardown_cpu_ports(dst);
return err; return err;
} }
...@@ -966,7 +966,7 @@ static void dsa_tree_teardown(struct dsa_switch_tree *dst) ...@@ -966,7 +966,7 @@ static void dsa_tree_teardown(struct dsa_switch_tree *dst)
dsa_tree_teardown_switches(dst); dsa_tree_teardown_switches(dst);
dsa_tree_teardown_default_cpu(dst); dsa_tree_teardown_cpu_ports(dst);
list_for_each_entry_safe(dl, next, &dst->rtable, list) { list_for_each_entry_safe(dl, next, &dst->rtable, list) {
list_del(&dl->list); list_del(&dl->list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment