Skip to content

Commit

Permalink
net: change sysctl_net_ll_poll into an unsigned int
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eliezer Tamir authored and David S. Miller committed Jun 17, 2013
1 parent 2e0c9e7 commit eb6db62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions include/net/ll_poll.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions net/core/sysctl_net_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
#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

Expand Down

0 comments on commit eb6db62

Please sign in to comment.