s390/module: fix building test_modules_helpers.o with clang
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 31 Jan 2022 13:17:11 +0000 (14:17 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Sun, 6 Feb 2022 22:30:37 +0000 (23:30 +0100)
Move test_modules_return_* prototypes into a header file in order to
placate -Wmissing-prototypes.

Fixes: 90c5318795ee ("s390/module: test loading modules with a lot of relocations")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/lib/test_modules.c
arch/s390/lib/test_modules.h

index d056baa..9894009 100644 (file)
@@ -5,9 +5,6 @@
 
 #include "test_modules.h"
 
-#define DECLARE_RETURN(i) int test_modules_return_ ## i(void)
-REPEAT_10000(DECLARE_RETURN);
-
 /*
  * Test that modules with many relocations are loaded properly.
  */
index 43b5e4b..6371fcf 100644 (file)
@@ -47,4 +47,7 @@
        __REPEAT_10000_1(f, 8); \
        __REPEAT_10000_1(f, 9)
 
+#define DECLARE_RETURN(i) int test_modules_return_ ## i(void)
+REPEAT_10000(DECLARE_RETURN);
+
 #endif