[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f8d3b5d4-a539-8f47-eeb4-39b055f131e3@redhat.com>
Date: Mon, 2 Aug 2021 09:58:33 +0200
From: Daniel Bristot de Oliveira <bristot@...hat.com>
To: Randy Dunlap <rdunlap@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, Matthew Wilcox <willy@...radead.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c
On 7/31/21 3:11 AM, Randy Dunlap wrote:
> On 7/30/21 5:40 PM, Steven Rostedt wrote:
>> On Fri, 30 Jul 2021 17:00:55 -0700
>> Randy Dunlap <rdunlap@...radead.org> wrote:
>>
>>> OK, I'm officially tired of this noise warning coming from
>>> trace_osnoise.c, so shut it up. Also, adding new warnings is not OK.
>> I agree adding "new warnings" is not OK, but this is a stupid warning.
>>
>>> ../kernel/trace/trace_osnoise.c: In function ‘start_kthread’:
>>> ../kernel/trace/trace_osnoise.c:1461:8: warning: ‘main’ is usually a function [-Wmain]
>>> void *main = osnoise_main;
>>> ^~~~
>>>
>>> Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations")
>>> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
>>> Suggested-by: Matthew Wilcox <willy@...radead.org>
>>> Cc: Steven Rostedt <rostedt@...dmis.org>
>>> Cc: Ingo Molnar <mingo@...hat.com>
>>> Cc: Daniel Bristot de Oliveira <bristot@...hat.com>
>>> ---
>>> kernel/trace/Makefile | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> --- mmotm-2021-0728-1824.orig/kernel/trace/Makefile
>>> +++ mmotm-2021-0728-1824/kernel/trace/Makefile
>>> @@ -36,6 +36,8 @@ CFLAGS_bpf_trace.o := -I$(src)
>>> CFLAGS_trace_benchmark.o := -I$(src)
>>> CFLAGS_trace_events_filter.o := -I$(src)
>>>
>>> +CFLAGS_trace_osnoise.o := -Wno-main
>> Why just add it here. It's a silly warning to have for the kernel at
>> all. Should this not be added in a more global place?
> I don't know of any other places that name something 'main' when it is
> not a main() function.
>
I would say that we either use -Wno-main for the entire kernel or rename the
main variable to tracer_main....
-- Daniel
Powered by blists - more mailing lists