linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] powerpc/math_emu/efp: Include module.h
@ 2022-09-02 10:08 Christophe Leroy
  2022-09-02 10:08 ` [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings Christophe Leroy
  0 siblings, 1 reply; 8+ messages in thread
From: Christophe Leroy @ 2022-09-02 10:08 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin
  Cc: Nathan Chancellor, linuxppc-dev, linux-kernel, kernel test robot

From: Nathan Chancellor <nathan@kernel.org>

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>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Fixes: ac6f120369ff ("powerpc/85xx: Workaroudn e500 CPU erratum A005")
[chleroy: added fixes tag]
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 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>
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH v2 1/2] powerpc/math_emu/efp: Include module.h
@ 2022-09-02 16:00 Christophe Leroy
  2022-09-02 16:00 ` [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings Christophe Leroy
  0 siblings, 1 reply; 8+ messages in thread
From: Christophe Leroy @ 2022-09-02 16:00 UTC (permalink / raw)
  To: Arnd Bergmann, linux-arch, Michael Ellerman, Nicholas Piggin
  Cc: Nathan Chancellor, linuxppc-dev, linux-kernel, kernel test robot

From: Nathan Chancellor <nathan@kernel.org>

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>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Fixes: ac6f120369ff ("powerpc/85xx: Workaroudn e500 CPU erratum A005")
[chleroy: added fixes tag]
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 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>
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-02 16:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-02 10:08 [PATCH v2 1/2] powerpc/math_emu/efp: Include module.h Christophe Leroy
2022-09-02 10:08 ` [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings Christophe Leroy
2022-09-02 15:37   ` Nathan Chancellor
2022-09-02 15:59     ` Segher Boessenkool
2022-09-02 16:11       ` Christophe Leroy
2022-09-02 16:11       ` Nathan Chancellor
2022-09-02 16:27         ` Segher Boessenkool
  -- strict thread matches above, loose matches on Subject: below --
2022-09-02 16:00 [PATCH v2 1/2] powerpc/math_emu/efp: Include module.h Christophe Leroy
2022-09-02 16:00 ` [PATCH v2 2/2] powerpc/math-emu: Remove -w build flag and fix warnings Christophe Leroy

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