From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH] kernel/bpf/syscall: fix warning defined but not used Date: Wed, 4 Apr 2018 11:15:29 +0200 Message-ID: <327e3c1f-860b-e2b4-7475-34a409c62fae@iogearbox.net> References: <20180403120947.9321-1-anders.roxell@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Anders Roxell , ast@kernel.org Return-path: In-Reply-To: <20180403120947.9321-1-anders.roxell@linaro.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 04/03/2018 02:09 PM, Anders Roxell wrote: > There will be a build warning -Wunused-function if CONFIG_CGROUP_BPF > isn't defined, since the only user is inside #ifdef CONFIG_CGROUP_BPF: > kernel/bpf/syscall.c:1229:12: warning: ‘bpf_prog_attach_check_attach_type’ > defined but not used [-Wunused-function] > static int bpf_prog_attach_check_attach_type(const struct bpf_prog *prog, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Current code moves function bpf_prog_attach_check_attach_type inside > ifdef CONFIG_CGROUP_BPF. > > Fixes: 5e43f899b03a ("bpf: Check attach type at prog load time") > Signed-off-by: Anders Roxell Applied to bpf tree, thanks Anders!