net: change sysctl_net_ll_poll into an unsigned int
authorEliezer Tamir <eliezer.tamir@linux.intel.com>
Fri, 14 Jun 2013 13:33:25 +0000 (16:33 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Jun 2013 22:48:13 +0000 (15:48 -0700)
There is no reason for sysctl_net_ll_poll to be an unsigned long.
Change it into an unsigned int.
Fix the proc handler.

Signed-off-by: Eliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ll_poll.h
net/core/sysctl_net_core.c
net/socket.c

index bc262f88173f8e5eaa871bb527d51ec9975e3088..44e2f707cb9f7a4d8df2bc0c53cb764359f8fe75 100644 (file)
@@ -34,7 +34,7 @@
 #ifdef CONFIG_NET_LL_RX_POLL
 
 struct napi_struct;
-extern unsigned long sysctl_net_ll_poll __read_mostly;
+extern unsigned int sysctl_net_ll_poll __read_mostly;
 
 /* return values from ndo_ll_poll */
 #define LL_FLUSH_FAILED                -1
@@ -45,7 +45,8 @@ extern unsigned long sysctl_net_ll_poll __read_mostly;
 
 static inline cycles_t ll_end_time(void)
 {
-       return TSC_MHZ * ACCESS_ONCE(sysctl_net_ll_poll) + get_cycles();
+       return (cycles_t)TSC_MHZ * ACCESS_ONCE(sysctl_net_ll_poll)
+                       + get_cycles();
 }
 
 static inline bool sk_valid_ll(struct sock *sk)
index 78c746e016aeec2fa420691c87d16d98d28c0d4c..62702c2053de6d0ccab068769db4c5e56b03d9b4 100644 (file)
@@ -302,9 +302,9 @@ static struct ctl_table net_core_table[] = {
        {
                .procname       = "low_latency_poll",
                .data           = &sysctl_net_ll_poll,
-               .maxlen         = sizeof(unsigned long),
+               .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
-               .proc_handler   = proc_doulongvec_minmax
+               .proc_handler   = proc_dointvec
        },
 #endif
 #endif /* CONFIG_NET */
index 21fd29f63ed241cfbde465879c59182f22f472cd..caaffa14e87e88260c14d6daaa0afb262b831c2e 100644 (file)
 #include <net/ll_poll.h>
 
 #ifdef CONFIG_NET_LL_RX_POLL
-unsigned long sysctl_net_ll_poll __read_mostly;
+unsigned int sysctl_net_ll_poll __read_mostly;
 EXPORT_SYMBOL_GPL(sysctl_net_ll_poll);
 #endif