Commit eb6db622825b2028df74f490b8c36887cf3c2f50

Authored by Eliezer Tamir
Committed by David S. Miller
1 parent 2e0c9e7911

net: change sysctl_net_ll_poll into an unsigned int

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>

Showing 3 changed files with 6 additions and 5 deletions Side-by-side Diff

include/net/ll_poll.h
... ... @@ -34,7 +34,7 @@
34 34 #ifdef CONFIG_NET_LL_RX_POLL
35 35  
36 36 struct napi_struct;
37   -extern unsigned long sysctl_net_ll_poll __read_mostly;
  37 +extern unsigned int sysctl_net_ll_poll __read_mostly;
38 38  
39 39 /* return values from ndo_ll_poll */
40 40 #define LL_FLUSH_FAILED -1
... ... @@ -45,7 +45,8 @@
45 45  
46 46 static inline cycles_t ll_end_time(void)
47 47 {
48   - return TSC_MHZ * ACCESS_ONCE(sysctl_net_ll_poll) + get_cycles();
  48 + return (cycles_t)TSC_MHZ * ACCESS_ONCE(sysctl_net_ll_poll)
  49 + + get_cycles();
49 50 }
50 51  
51 52 static inline bool sk_valid_ll(struct sock *sk)
net/core/sysctl_net_core.c
... ... @@ -302,9 +302,9 @@
302 302 {
303 303 .procname = "low_latency_poll",
304 304 .data = &sysctl_net_ll_poll,
305   - .maxlen = sizeof(unsigned long),
  305 + .maxlen = sizeof(unsigned int),
306 306 .mode = 0644,
307   - .proc_handler = proc_doulongvec_minmax
  307 + .proc_handler = proc_dointvec
308 308 },
309 309 #endif
310 310 #endif /* CONFIG_NET */
... ... @@ -107,7 +107,7 @@
107 107 #include <net/ll_poll.h>
108 108  
109 109 #ifdef CONFIG_NET_LL_RX_POLL
110   -unsigned long sysctl_net_ll_poll __read_mostly;
  110 +unsigned int sysctl_net_ll_poll __read_mostly;
111 111 EXPORT_SYMBOL_GPL(sysctl_net_ll_poll);
112 112 #endif
113 113