]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: provide a find or new tree helper
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 3 Nov 2017 23:05:24 +0000 (19:05 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 13:31:39 +0000 (22:31 +0900)
commit68dee8635ade21a8b6e4300ad75c5902b0802144
treeee3531e3e3d447b35c2a9cdf5f037014af5f9466
parent7d3b23b1edc24a8bd36d5f39a5bd3b741c91e108
net: dsa: provide a find or new tree helper

Rename dsa_get_dst to dsa_tree_find since it doesn't increment the
reference counter, rename dsa_add_dst to dsa_tree_alloc for symmetry
with dsa_tree_free, and provide a convenient dsa_tree_touch function to
find or allocate a new tree.

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