Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb6db622 authored by Eliezer Tamir's avatar Eliezer Tamir Committed by David S. Miller
Browse files

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: default avatarEliezer Tamir <eliezer.tamir@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2e0c9e79
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@
#ifdef CONFIG_NET_LL_RX_POLL
#ifdef CONFIG_NET_LL_RX_POLL


struct napi_struct;
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 */
/* return values from ndo_ll_poll */
#define LL_FLUSH_FAILED		-1
#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)
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)
static inline bool sk_valid_ll(struct sock *sk)
+2 −2
Original line number Original line Diff line number Diff line
@@ -302,9 +302,9 @@ static struct ctl_table net_core_table[] = {
	{
	{
		.procname	= "low_latency_poll",
		.procname	= "low_latency_poll",
		.data		= &sysctl_net_ll_poll,
		.data		= &sysctl_net_ll_poll,
		.maxlen		= sizeof(unsigned long),
		.maxlen		= sizeof(unsigned int),
		.mode		= 0644,
		.mode		= 0644,
		.proc_handler	= proc_doulongvec_minmax
		.proc_handler	= proc_dointvec
	},
	},
#endif
#endif
#endif /* CONFIG_NET */
#endif /* CONFIG_NET */
+1 −1
Original line number Original line Diff line number Diff line
@@ -107,7 +107,7 @@
#include <net/ll_poll.h>
#include <net/ll_poll.h>


#ifdef CONFIG_NET_LL_RX_POLL
#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);
EXPORT_SYMBOL_GPL(sysctl_net_ll_poll);
#endif
#endif