Skip to content

Commit

Permalink
s390/module: fix building test_modules_helpers.o with clang
Browse files Browse the repository at this point in the history
[ Upstream commit e286f23 ]

Move test_modules_return_* prototypes into a header file in order to
placate -Wmissing-prototypes.

Fixes: 90c5318 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
iii-i authored and gregkh committed Feb 16, 2022
1 parent 0ae0a3b commit 5ccd87f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions arch/s390/lib/test_modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
3 changes: 3 additions & 0 deletions arch/s390/lib/test_modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5ccd87f

Please sign in to comment.