LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
	Matthew Wilcox <willy@infradead.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c
Date: Mon, 2 Aug 2021 09:58:33 +0200	[thread overview]
Message-ID: <f8d3b5d4-a539-8f47-eeb4-39b055f131e3@redhat.com> (raw)
In-Reply-To: <d4fdf5f0-ba3b-1260-b320-3045f218e6a6@infradead.org>

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


  reply	other threads:[~2021-08-02  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31  0:00 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 [this message]
2021-08-03  4:12       ` Randy Dunlap

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=f8d3b5d4-a539-8f47-eeb4-39b055f131e3@redhat.com \
    --to=bristot@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=willy@infradead.org \
    --subject='Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c' \
    /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

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).