Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5743735iob; Tue, 10 May 2022 02:38:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgxEM0kXJJfrTucmsKVvfHIzdRzN7UnqjIa6XLfCoaJy3YDc3MHkWzirub2v1zE0OsIRZF X-Received: by 2002:a05:6a00:13a5:b0:50e:db7d:9df1 with SMTP id t37-20020a056a0013a500b0050edb7d9df1mr20039501pfg.54.1652175486789; Tue, 10 May 2022 02:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652175486; cv=none; d=google.com; s=arc-20160816; b=Sa9ghkIsUi9vKPxgeCXTA3ItkN2w5Imxyb0NIKIBWxEch/KuSpZ8bybf0O9TnzLHCN JcRWdq9qu2zIWtItJiCRiXXolX4mAqlCF1gpXJXo2mfvhf/vyD+BVpGQwHGEyjMC3XnT jMWFIHUaPYt9wIzuFEsBhFVnUZh3iqx9TmXAFHM6kia1coQ3hYj+mFb2RBc4fcBxGKVY mKJhsgerecR+zlaNCe2rrEBqNGzwEw8qaJTWcoXza0vOB+lGWaiDIbMWIdmcJxOEZCay DtB9P5F2LmlftwvOkk4tpU6dn7Vi8f0NKGtnMyB5gH/z9nbapUPjCRYRaGk1COfXs5XV BchA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=+9cE0KoUIUVKTTee5hDKjcO2EKwOHTur0yeYPIct5TE=; b=PjrVU+CoLkH/VF9/ea7YbEvnwJE7yzhXkTUhthVFLBnKKL326/AkUUlkumjMtJijeR UfXwu3HAlZH2hH1lMXFnflagPsnwAJF/fgPA/vkLOtueUzgRvDgyRFp9GvuykYKi6MFt 2PMW5QJvYFVuA2pLmoCbJrvqFS590qfR7F3fLgY4Mhg4f+Y2+iYWPEs9vB4AR7i7WZH+ Syz50AcccCwFq14VrPd5cVbjEKOTTBPLxWgfDGOuRu3PAQX1QyOjvG6HMovQblW4+14v mtalnVxRJBe71EEC484SkSe4NGRU2LwZsFv4FsQpoUDBt78ay37C8mif8ltvSf91Nou0 GWIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j71-20020a63804a000000b003aa6d425de4si15657522pgd.169.2022.05.10.02.37.52; Tue, 10 May 2022 02:38:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235604AbiEJDmC (ORCPT + 99 others); Mon, 9 May 2022 23:42:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235507AbiEJDkh (ORCPT ); Mon, 9 May 2022 23:40:37 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 903C7208F6F; Mon, 9 May 2022 20:35:10 -0700 (PDT) Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Axythn3XliaKoPAA--.50059S3; Tue, 10 May 2022 11:35:04 +0800 (CST) From: Tiezhu Yang To: davem@davemloft.net, Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: Xuefeng Li , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH bpf-next v2 1/2] net: sysctl: Use SYSCTL_TWO instead of &two Date: Tue, 10 May 2022 11:35:02 +0800 Message-Id: <1652153703-22729-2-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1652153703-22729-1-git-send-email-yangtiezhu@loongson.cn> References: <1652153703-22729-1-git-send-email-yangtiezhu@loongson.cn> X-CM-TRANSID: AQAAf9Axythn3XliaKoPAA--.50059S3 X-Coremail-Antispam: 1UD129KBjvJXoW7Zr1xtw4UXr13CrWkKw1rWFg_yoW8JFWxpr n3G3yUKF98GryxAa95CFZ8Krn8Jr4DuF4UWF9FkayFka4qgr95JF1kWryjqrWUAFWjgFyx XrW0yr98W3yIy3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUPE14x267AKxVW5JVWrJwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2048vs2IY020E87I2jVAFwI0_Jr4l82xGYIkIc2 x26xkF7I0E14v26r1I6r4UM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0 Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJw A2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F4UJVW0 owAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7 IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4U M4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2 kIc2xKxwCY02Avz4vE14v_Gr4l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_ Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17 CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0 I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I 8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73 UjIFyTuYvjfUn3kuDUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- net/core/sysctl_net_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 8295e58..cf00dd7 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", -- 2.1.0