From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-renesas-soc@vger.kernel.org, stable@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Kate Stewart <kstewart@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kernel/bounds: Provide prototype for foo
Date: Fri, 21 Sep 2018 16:45:27 +0200 [thread overview]
Message-ID: <20180921144527.GB16316@kroah.com> (raw)
In-Reply-To: <20180921142234.16882-1-kieran.bingham+renesas@ideasonboard.com>
On Fri, Sep 21, 2018 at 03:22:33PM +0100, Kieran Bingham wrote:
> kernel/bounds.c is recompiled on every build, and shows the following
> warning when compiling with W=1:
Don't do that, you will get a lot of warnings that really don't make
much sense. Like this one :)
>
> CC kernel/bounds.s
> linux/kernel/bounds.c:16:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes]
> void foo(void)
> ^~~
>
> Provide a prototype to satisfy the compiler.
>
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Cc: stable@vger.kernel.org
>
> ---
> I compile all of my incremental builds with W=1, which allows me to know
> instantly if I add a new compiler warning in code I generate.
>
> This warning always comes up and seems trivial to clean up.
> ---
> kernel/bounds.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/bounds.c b/kernel/bounds.c
> index c373e887c066..60136d937800 100644
> --- a/kernel/bounds.c
> +++ b/kernel/bounds.c
> @@ -13,6 +13,8 @@
> #include <linux/log2.h>
> #include <linux/spinlock_types.h>
>
> +void foo(void);
> +
> void foo(void)
This file is a userspace tool that is used to later generate the
include/generated/bounds.h file.
If you really want to track this down and fix it properly, put the
prototype in the .c file that ends up calling this function. That's a
fun task to dig through the build system to find :)
good luck!
greg k-h
next prev parent reply other threads:[~2018-09-21 14:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 14:22 Kieran Bingham
2018-09-21 14:45 ` Greg Kroah-Hartman [this message]
2018-09-21 15:58 ` Kieran Bingham
2018-09-21 16:03 ` Kieran Bingham
2018-10-05 8:33 ` [PATCH] kbuild: fix kernel/bounds.c 'W=1' warning Arnd Bergmann
2018-10-05 8:47 ` Kieran Bingham
2018-10-05 8:52 ` David Laight
2018-10-05 9:07 ` Arnd Bergmann
2018-10-05 9:27 ` Kieran Bingham
2018-10-06 20:31 ` Masahiro Yamada
2018-10-06 21:18 ` Miguel Ojeda
2018-10-06 21:58 ` Masahiro Yamada
2018-10-06 22:06 ` Masahiro Yamada
2018-10-08 10:00 ` Kieran Bingham
2018-10-08 14:32 ` Masahiro Yamada
2018-10-08 14:41 ` Geert Uytterhoeven
2018-10-06 22:07 ` Miguel Ojeda
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=20180921144527.GB16316@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®