Skip to content

Commit

Permalink
net: dsa: make switch index unsigned
Browse files Browse the repository at this point in the history
Define the DSA switch index as an unsigned int, because it will never be
less than 0.

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>
  • Loading branch information
Vivien Didelot authored and David S. Miller committed Nov 5, 2017
1 parent 9524846 commit 99feaaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/dsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ struct dsa_switch {
* Parent switch tree, and switch index.
*/
struct dsa_switch_tree *dst;
int index;
unsigned int index;

/* Listener for switch fabric events */
struct notifier_block nb;
Expand Down

0 comments on commit 99feaaf

Please sign in to comment.