Skip to contentSkip to conversation

netdevice: change net_device->promiscuity/allmulti to unsigned int

PATCH Applied Wang Chen 2 participants 2 messages Jun 16, 2008 – Jun 18, 2008

Subsystems (2)
lore
Share & tools
lore

Wang Chen

author
#0 lore raw

PATCH 1/3 netdevice: change net_device->promiscuity/allmulti to unsigned int

The comments of dev_set_allmulti/promiscuity() is that "While the count in the device remains above zero...". So negative count is useless. Fix the type of the counter from "int" to "unsigned int".

---
 include/linux/netdevice.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/netdevice.h +2 -2
index f27fd20..06d8ea5 100644
@@ -595,8 +595,8 @@ struct net_device
 	int			uc_promisc;
 	struct dev_addr_list	*mc_list;	/* Multicast mac addresses	*/
 	int			mc_count;	/* Number of installed mcasts	*/
-	int			promiscuity;
-	int			allmulti;
+	unsigned int		promiscuity;
+	unsigned int		allmulti;
 
 
 	/* Protocol specific pointers */
Signature · 1 line
1.5.3.4
maintainer Applied
#1 lore raw

From: Wang Chen <[email protected]>
Date: Mon, 16 Jun 2008 17:14:53 +0800

Quoted 5 lines

The comments of dev_set_allmulti/promiscuity() is that "While the count in the device remains above zero...". So negative count is useless. Fix the type of the counter from "int" to "unsigned int".

Applied to net-next-2.6, thanks!