From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Nathan Chancellor <nathan@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: kernel test robot <lkp@intel.com>, Arnd Bergmann <arnd@arndb.de>,
Tom Rix <trix@redhat.com>,
"llvm@lists.linux.dev" <llvm@lists.linux.dev>,
Nick Desaulniers <ndesaulniers@google.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Nicholas Piggin <npiggin@gmail.com>,
"patches@lists.linux.dev" <patches@lists.linux.dev>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc/math_emu/efp: Include module.h
Date: Thu, 1 Sep 2022 05:41:33 +0000 [thread overview]
Message-ID: <efd56f3e-bc8c-5da5-559d-e0bc6b21fa5b@csgroup.eu> (raw)
In-Reply-To: <20220831152014.3501664-1-nathan@kernel.org>
Le 31/08/2022 à 17:20, Nathan Chancellor a écrit :
> When building with a recent version of clang, there are a couple of
> errors around the call to module_init():
>
> arch/powerpc/math-emu/math_efp.c:927:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
> module_init(spe_mathemu_init);
> ^
> int
> arch/powerpc/math-emu/math_efp.c:927:13: error: a parameter list without types is only allowed in a function definition
> module_init(spe_mathemu_init);
> ^
> 2 errors generated.
>
> module_init() is a macro, which is not getting expanded because module.h
> is not included in this file. Add the include so that the macro can
> expand properly, clearing up the build failure.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>
> No Fixes tag because it seems likely that this is a transient include
> issue (the code builds with GCC). The robot blamed commit e8c07082a810
> ("Kbuild: move to -std=gnu11") but I think that just exposed these
> errors, not caused them.
Well spoted.
Seems like a GCC bug. The code builds fine but silently ignores the
issue and the following section is missing:
8 .initcall6.init 00000004 00000000 00000000 00008b30 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
It means spe_mathemu_init() is never called.
I think it would be worth a GCC bug report.
And by the way:
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Fixes: ac6f120369ff ("powerpc/85xx: Workaroudn e500 CPU erratum A005")
>
> arch/powerpc/math-emu/math_efp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/math-emu/math_efp.c b/arch/powerpc/math-emu/math_efp.c
> index 39b84e7452e1..aa3bb8da1cb9 100644
> --- a/arch/powerpc/math-emu/math_efp.c
> +++ b/arch/powerpc/math-emu/math_efp.c
> @@ -17,6 +17,7 @@
>
> #include <linux/types.h>
> #include <linux/prctl.h>
> +#include <linux/module.h>
>
> #include <linux/uaccess.h>
> #include <asm/reg.h>
>
> base-commit: dcf8e5633e2e69ad60b730ab5905608b756a032f
next prev parent reply other threads:[~2022-09-01 5:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 15:20 [PATCH] powerpc/math_emu/efp: Include module.h Nathan Chancellor
2022-09-01 5:41 ` Christophe Leroy [this message]
2022-09-01 19:47 ` Segher Boessenkool
2022-09-02 8:43 ` Christophe Leroy
2022-09-02 12:40 ` Segher Boessenkool
2022-09-09 12:06 ` Michael Ellerman
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=efd56f3e-bc8c-5da5-559d-e0bc6b21fa5b@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=npiggin@gmail.com \
--cc=patches@lists.linux.dev \
--cc=trix@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).