[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190617190920.71c21a6c@gandalf.local.home>
Date: Mon, 17 Jun 2019 19:09:20 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andriin@...com>, Yonghong Song <yhs@...com>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>,
Matt Mullins <mmullins@...com>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bpf: hide do_bpf_send_signal when unused
On Mon, 17 Jun 2019 08:26:29 -0700
Alexei Starovoitov <alexei.starovoitov@...il.com> wrote:
> On Mon, Jun 17, 2019 at 5:59 AM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > When CONFIG_MODULES is disabled, this function is never called:
> >
> > kernel/trace/bpf_trace.c:581:13: error: 'do_bpf_send_signal' defined but not used [-Werror=unused-function]
>
> hmm. it should work just fine without modules.
> the bug is somewhere else.
>From what I see, the only use of do_bpf_send_signal is within a
#ifdef CONFIG_MODULES, which means that you will get a warning about a
static unused when CONFIG_MODULES is not defined.
In kernel/trace/bpf_trace.c we have:
static void do_bpf_send_signal(struct irq_work *entry)
[..]
#ifdef CONFIG_MODULES
[..]
for_each_possible_cpu(cpu) {
work = per_cpu_ptr(&send_signal_work, cpu);
init_irq_work(&work->irq_work, do_bpf_send_signal); <-- on use of do_bpf_send_signal
}
[..]
#endif /* CONFIG_MODULES */
The bug (really just a warning) reported is exactly here.
-- Steve
Powered by blists - more mailing lists