All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] netdevice: change net_device->promiscuity/allmulti to unsigned int
@ 2008-06-16  9:14 Wang Chen
  2008-06-18  4:12 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Chen @ 2008-06-16  9:14 UTC (permalink / raw)
  To: David S. Miller; +Cc: NETDEV

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".

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
 include/linux/netdevice.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f27fd20..06d8ea5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -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 */
-- 
1.5.3.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-18  4:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-16  9:14 [PATCH 1/3] netdevice: change net_device->promiscuity/allmulti to unsigned int Wang Chen
2008-06-18  4:12 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.