diff mbox series

[net-next,01/11] net: dsa: make switch index unsigned

Message ID 20171103230530.996-2-vivien.didelot@savoirfairelinux.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series net: dsa: parsing stage | expand

Commit Message

Vivien Didelot Nov. 3, 2017, 11:05 p.m. UTC
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>
---
 include/net/dsa.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Florian Fainelli Nov. 3, 2017, 11:09 p.m. UTC | #1
On 11/03/2017 04:05 PM, Vivien Didelot wrote:
> 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>
diff mbox series

Patch

diff --git a/include/net/dsa.h b/include/net/dsa.h
index 50e276dc4c01..fa1c21ab8092 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -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;