All of lore.kernel.org
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Christian Brauner <christian@brauner.io>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Luis Chamberlain <mcgrof@kernel.org>,
	"Kees Cook" <keescook@chromium.org>,
	Alexei Starovoitov <ast@kernel.org>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	Martin Lau <kafai@fb.com>, Yonghong Song <yhs@fb.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: Re: [PATCH] bpf: fix sysctl.c warning
Date: Mon, 4 Mar 2019 20:58:59 +0000	[thread overview]
Message-ID: <C94EB246-92FE-4A8D-AD60-C3D6F8292C0E@fb.com> (raw)
In-Reply-To: <20190304205714.rhpgpp26rbaghs2i@brauner.io>



> On Mar 4, 2019, at 12:57 PM, Christian Brauner <christian@brauner.io> wrote:
> 
> On Mon, Mar 04, 2019 at 09:34:12PM +0100, Arnd Bergmann wrote:
>> When CONFIG_BPF_SYSCALL or CONFIG_SYSCTL is disabled, we get
>> a warning about an unused function:
>> 
>> kernel/sysctl.c:3331:12: error: 'proc_dointvec_minmax_bpf_stats' defined but not used [-Werror=unused-function]
>> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
>> 
>> The CONFIG_BPF_SYSCALL check was already handled, but the SYSCTL check
>> is needed on top.
>> 
>> Fixes: 492ecee892c2 ("bpf: enable program stats")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Reviewed-by: Christian Brauner <christian@brauner.io>

Acked-by: Song Liu <songliubraving@fb.com>

> 
>> ---
>> kernel/sysctl.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
>> index 46a0d0a14a66..b3df3ab7ac28 100644
>> --- a/kernel/sysctl.c
>> +++ b/kernel/sysctl.c
>> @@ -3330,7 +3330,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
>> 
>> #endif /* CONFIG_PROC_SYSCTL */
>> 
>> -#ifdef CONFIG_BPF_SYSCALL
>> +#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_SYSCTL)
>> static int proc_dointvec_minmax_bpf_stats(struct ctl_table *table, int write,
>> 					  void __user *buffer, size_t *lenp,
>> 					  loff_t *ppos)
>> -- 
>> 2.20.0
>> 


  reply	other threads:[~2019-03-04 20:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 20:34 [PATCH] bpf: fix sysctl.c warning Arnd Bergmann
2019-03-04 20:47 ` Kees Cook
2019-03-04 20:57 ` Christian Brauner
2019-03-04 20:58   ` Song Liu [this message]
2019-03-07 10:05 ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C94EB246-92FE-4A8D-AD60-C3D6F8292C0E@fb.com \
    --to=songliubraving@fb.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=christian@brauner.io \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.