Commit f922c897 authored by Tiezhu Yang's avatar Tiezhu Yang Committed by Alexei Starovoitov

net: sysctl: Use SYSCTL_TWO instead of &two

It is better to use SYSCTL_TWO instead of &two, and then we can
remove the variable "two" in net/core/sysctl_net_core.c.
Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/1652153703-22729-2-git-send-email-yangtiezhu@loongson.cn
parent 43bf0878
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "dev.h" #include "dev.h"
static int two = 2;
static int three = 3; static int three = 3;
static int int_3600 = 3600; static int int_3600 = 3600;
static int min_sndbuf = SOCK_MIN_SNDBUF; static int min_sndbuf = SOCK_MIN_SNDBUF;
...@@ -390,7 +389,7 @@ static struct ctl_table net_core_table[] = { ...@@ -390,7 +389,7 @@ static struct ctl_table net_core_table[] = {
.extra2 = SYSCTL_ONE, .extra2 = SYSCTL_ONE,
# else # else
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = &two, .extra2 = SYSCTL_TWO,
# endif # endif
}, },
# ifdef CONFIG_HAVE_EBPF_JIT # ifdef CONFIG_HAVE_EBPF_JIT
...@@ -401,7 +400,7 @@ static struct ctl_table net_core_table[] = { ...@@ -401,7 +400,7 @@ static struct ctl_table net_core_table[] = {
.mode = 0600, .mode = 0600,
.proc_handler = proc_dointvec_minmax_bpf_restricted, .proc_handler = proc_dointvec_minmax_bpf_restricted,
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = &two, .extra2 = SYSCTL_TWO,
}, },
{ {
.procname = "bpf_jit_kallsyms", .procname = "bpf_jit_kallsyms",
...@@ -546,7 +545,7 @@ static struct ctl_table net_core_table[] = { ...@@ -546,7 +545,7 @@ static struct ctl_table net_core_table[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec_minmax, .proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = &two, .extra2 = SYSCTL_TWO,
}, },
{ {
.procname = "devconf_inherit_init_net", .procname = "devconf_inherit_init_net",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment