]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: make switch index unsigned
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 3 Nov 2017 23:05:20 +0000 (19:05 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 13:31:38 +0000 (22:31 +0900)
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>
include/net/dsa.h

index 50e276dc4c013bf9ab7b98adbde62bf7626a582d..fa1c21ab809291687ca8373fa431c9b3714e3e03 100644 (file)
@@ -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;