net: dsa: make tree index unsigned

Similarly to a DSA switch and port, rename the tree index from "tree" to
"index" and make it an unsigned int because it isn't supposed to be less
than 0.

u32 is an OF specific data used to retrieve the value and has no need to
be propagated up to the tree index.

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>
This commit is contained in:
Vivien Didelot 2017-11-03 19:05:21 -04:00 committed by David S. Miller
parent 99feaafcdb
commit 49463b7f2d
3 changed files with 9 additions and 9 deletions

View file

@ -116,7 +116,7 @@ struct dsa_switch_tree {
struct raw_notifier_head nh;
/* Tree identifier */
u32 tree;
unsigned int index;
/* Number of switches attached to this tree */
struct kref refcount;