From: Steven Rostedt <rostedt@goodmis.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Daniel Bristot de Oliveira <bristot@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH] Makefile: use -Wno-main in the full kernel tree
Date: Mon, 16 Aug 2021 11:08:55 -0400 [thread overview]
Message-ID: <20210816110855.4bb594d4@oasis.local.home> (raw)
In-Reply-To: <20210813224131.25803-1-rdunlap@infradead.org>
On Fri, 13 Aug 2021 15:41:31 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:
> When using gcc (SUSE Linux) 7.5.0 (on openSUSE 15.3), I see a
> build 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;
> ^~~~
>
> Quieten that warning by using "-Wno-main". It's OK to use "main" as a
> declaration name in the kernel.
>
> Build-tested on most ARCHes.
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: linux-kbuild@vger.kernel.org
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20210812.orig/Makefile
> +++ linux-next-20210812/Makefile
> @@ -522,7 +522,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-P
> KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
> -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
> -Werror=implicit-function-declaration -Werror=implicit-int \
> - -Werror=return-type -Wno-format-security \
> + -Werror=return-type -Wno-format-security -Wno-main \
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
> -std=gnu89
> KBUILD_CPPFLAGS := -D__KERNEL__
> KBUILD_RUST_TARGET := $(srctree)/arch/$(SRCARCH)/rust/target.json
prev parent reply other threads:[~2021-08-16 15:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 22:41 [PATCH] Makefile: use -Wno-main in the full kernel tree Randy Dunlap
2021-08-14 0:01 ` Linus Torvalds
2021-08-14 0:29 ` Randy Dunlap
2021-08-17 0:33 ` Linus Torvalds
2021-08-17 0:38 ` Linus Torvalds
2021-08-17 1:01 ` Randy Dunlap
2021-08-17 1:31 ` Linus Torvalds
2021-08-17 2:05 ` Steven Rostedt
2021-08-21 23:26 ` Randy Dunlap
2021-09-07 22:42 ` Randy Dunlap
2021-08-16 15:08 ` Steven Rostedt [this message]
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=20210816110855.4bb594d4@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=bristot@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=rdunlap@infradead.org \
--cc=torvalds@linux-foundation.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox