diff options
author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2022-05-10 06:35:02 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-05-10 20:13:06 +0300 |
commit | f922c8972fb53ad9221501e2e432f06246c74cc8 (patch) | |
tree | 3aa221dee916f58de16e674adf1e0b1bb5a4c764 /net/core | |
parent | 43bf087848ab796fab93c9b4de59a7ed70aab94a (diff) | |
download | linux-f922c8972fb53ad9221501e2e432f06246c74cc8.tar.xz |
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: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/1652153703-22729-2-git-send-email-yangtiezhu@loongson.cn
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sysctl_net_core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 8295e5877eb3..cf00dd7d46d7 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c @@ -25,7 +25,6 @@ #include "dev.h" -static int two = 2; static int three = 3; static int int_3600 = 3600; static int min_sndbuf = SOCK_MIN_SNDBUF; @@ -390,7 +389,7 @@ static struct ctl_table net_core_table[] = { .extra2 = SYSCTL_ONE, # else .extra1 = SYSCTL_ZERO, - .extra2 = &two, + .extra2 = SYSCTL_TWO, # endif }, # ifdef CONFIG_HAVE_EBPF_JIT @@ -401,7 +400,7 @@ static struct ctl_table net_core_table[] = { .mode = 0600, .proc_handler = proc_dointvec_minmax_bpf_restricted, .extra1 = SYSCTL_ZERO, - .extra2 = &two, + .extra2 = SYSCTL_TWO, }, { .procname = "bpf_jit_kallsyms", @@ -546,7 +545,7 @@ static struct ctl_table net_core_table[] = { .mode = 0644, .proc_handler = proc_dointvec_minmax, .extra1 = SYSCTL_ZERO, - .extra2 = &two, + .extra2 = SYSCTL_TWO, }, { .procname = "devconf_inherit_init_net", |