]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: rework switch addition and removal
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 3 Nov 2017 23:05:25 +0000 (19:05 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 13:31:39 +0000 (22:31 +0900)
commit627fc927cf5945fa6a17a6fba084b08603504600
treeba1980973f919fceab88a82eb9fb2a2817dab459
parent68dee8635ade21a8b6e4300ad75c5902b0802144
net: dsa: rework switch addition and removal

This patch removes the unnecessary index argument from the
dsa_dst_add_ds and dsa_dst_del_ds functions and renames them to
dsa_tree_add_switch and dsa_tree_remove_switch respectively.

In addition to a more explicit scope, we now check the presence of an
existing switch with the same index directly within dsa_tree_add_switch.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa2.c