Re: [PATCH net-next 03/11] net: dsa: simplify tree reference counting

2017-11-03 Thread Florian Fainelli
On 11/03/2017 04:05 PM, Vivien Didelot wrote: > DSA trees have a refcount used to automatically free the dsa_switch_tree > structure once there is no switch devices inside of it. > > The refcount is incremented when a switch is added to the tree, and > decremented when it is removed from it. > >

[PATCH net-next 03/11] net: dsa: simplify tree reference counting

2017-11-03 Thread Vivien Didelot
DSA trees have a refcount used to automatically free the dsa_switch_tree structure once there is no switch devices inside of it. The refcount is incremented when a switch is added to the tree, and decremented when it is removed from it. But because of kref_init, the refcount is also incremented a