LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] trace: eradicate noisy warning in trace_osnoise.c
@ 2021-07-31 0:00 Randy Dunlap
2021-07-31 0:40 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2021-07-31 0:00 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Matthew Wilcox, Steven Rostedt, Ingo Molnar,
Daniel Bristot de Oliveira
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.
../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@infradead.org>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Daniel Bristot de Oliveira <bristot@redhat.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
+
obj-$(CONFIG_TRACE_CLOCK) += trace_clock.o
obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c
2021-07-31 0:00 [PATCH] trace: eradicate noisy warning in trace_osnoise.c Randy Dunlap
@ 2021-07-31 0:40 ` Steven Rostedt
2021-07-31 1:11 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2021-07-31 0:40 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, Matthew Wilcox, Ingo Molnar, Daniel Bristot de Oliveira
On Fri, 30 Jul 2021 17:00:55 -0700
Randy Dunlap <rdunlap@infradead.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@infradead.org>
> Suggested-by: Matthew Wilcox <willy@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Daniel Bristot de Oliveira <bristot@redhat.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?
-- Steve
> +
> obj-$(CONFIG_TRACE_CLOCK) += trace_clock.o
>
> obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c
2021-07-31 0:40 ` Steven Rostedt
@ 2021-07-31 1:11 ` Randy Dunlap
2021-08-02 7:58 ` Daniel Bristot de Oliveira
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2021-07-31 1:11 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kernel, Matthew Wilcox, Ingo Molnar, Daniel Bristot de Oliveira
On 7/30/21 5:40 PM, Steven Rostedt wrote:
> On Fri, 30 Jul 2021 17:00:55 -0700
> Randy Dunlap <rdunlap@infradead.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@infradead.org>
>> Suggested-by: Matthew Wilcox <willy@infradead.org>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Daniel Bristot de Oliveira <bristot@redhat.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.
> -- Steve
>
>
>> +
>> obj-$(CONFIG_TRACE_CLOCK) += trace_clock.o
>>
>> obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o
>
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c
2021-07-31 1:11 ` Randy Dunlap
@ 2021-08-02 7:58 ` Daniel Bristot de Oliveira
2021-08-03 4:12 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Bristot de Oliveira @ 2021-08-02 7:58 UTC (permalink / raw)
To: Randy Dunlap, Steven Rostedt; +Cc: linux-kernel, Matthew Wilcox, Ingo Molnar
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@infradead.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@infradead.org>
>>> Suggested-by: Matthew Wilcox <willy@infradead.org>
>>> Cc: Steven Rostedt <rostedt@goodmis.org>
>>> Cc: Ingo Molnar <mingo@redhat.com>
>>> Cc: Daniel Bristot de Oliveira <bristot@redhat.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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c
2021-08-02 7:58 ` Daniel Bristot de Oliveira
@ 2021-08-03 4:12 ` Randy Dunlap
0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2021-08-03 4:12 UTC (permalink / raw)
To: Daniel Bristot de Oliveira, Steven Rostedt
Cc: linux-kernel, Matthew Wilcox, Ingo Molnar
On 8/2/21 12:58 AM, Daniel Bristot de Oliveira wrote:
> 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@infradead.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@infradead.org>
>>>> Suggested-by: Matthew Wilcox <willy@infradead.org>
>>>> Cc: Steven Rostedt <rostedt@goodmis.org>
>>>> Cc: Ingo Molnar <mingo@redhat.com>
>>>> Cc: Daniel Bristot de Oliveira <bristot@redhat.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....
I'm OK with the latter...
thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-03 4:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31 0:00 [PATCH] trace: eradicate noisy warning in trace_osnoise.c Randy Dunlap
2021-07-31 0:40 ` Steven Rostedt
2021-07-31 1:11 ` Randy Dunlap
2021-08-02 7:58 ` Daniel Bristot de Oliveira
2021-08-03 4:12 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).