net: dsa: rename teardown_default_cpu to teardown_cpu_ports
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 4 Aug 2021 13:54:29 +0000 (16:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Aug 2021 10:05:48 +0000 (11:05 +0100)
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: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c

index c7fa85f..4f1aab6 100644 (file)
@@ -329,7 +329,7 @@ static int dsa_tree_setup_default_cpu(struct dsa_switch_tree *dst)
        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;
 
@@ -927,7 +927,7 @@ static int dsa_tree_setup(struct dsa_switch_tree *dst)
 
        err = dsa_tree_setup_switches(dst);
        if (err)
-               goto teardown_default_cpu;
+               goto teardown_cpu_ports;
 
        err = dsa_tree_setup_master(dst);
        if (err)
@@ -947,8 +947,8 @@ teardown_master:
        dsa_tree_teardown_master(dst);
 teardown_switches:
        dsa_tree_teardown_switches(dst);
-teardown_default_cpu:
-       dsa_tree_teardown_default_cpu(dst);
+teardown_cpu_ports:
+       dsa_tree_teardown_cpu_ports(dst);
 
        return err;
 }
@@ -966,7 +966,7 @@ static void dsa_tree_teardown(struct dsa_switch_tree *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_del(&dl->list);