forked from Minki/linux
e286f231ea
Move test_modules_return_* prototypes into a header file in order to
placate -Wmissing-prototypes.
Fixes: 90c5318795
("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>
54 lines
1.3 KiB
C
54 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
#ifndef TEST_MODULES_H
|
|
#define TEST_MODULES_H
|
|
|
|
#define __REPEAT_10000_3(f, x) \
|
|
f(x ## 0); \
|
|
f(x ## 1); \
|
|
f(x ## 2); \
|
|
f(x ## 3); \
|
|
f(x ## 4); \
|
|
f(x ## 5); \
|
|
f(x ## 6); \
|
|
f(x ## 7); \
|
|
f(x ## 8); \
|
|
f(x ## 9)
|
|
#define __REPEAT_10000_2(f, x) \
|
|
__REPEAT_10000_3(f, x ## 0); \
|
|
__REPEAT_10000_3(f, x ## 1); \
|
|
__REPEAT_10000_3(f, x ## 2); \
|
|
__REPEAT_10000_3(f, x ## 3); \
|
|
__REPEAT_10000_3(f, x ## 4); \
|
|
__REPEAT_10000_3(f, x ## 5); \
|
|
__REPEAT_10000_3(f, x ## 6); \
|
|
__REPEAT_10000_3(f, x ## 7); \
|
|
__REPEAT_10000_3(f, x ## 8); \
|
|
__REPEAT_10000_3(f, x ## 9)
|
|
#define __REPEAT_10000_1(f, x) \
|
|
__REPEAT_10000_2(f, x ## 0); \
|
|
__REPEAT_10000_2(f, x ## 1); \
|
|
__REPEAT_10000_2(f, x ## 2); \
|
|
__REPEAT_10000_2(f, x ## 3); \
|
|
__REPEAT_10000_2(f, x ## 4); \
|
|
__REPEAT_10000_2(f, x ## 5); \
|
|
__REPEAT_10000_2(f, x ## 6); \
|
|
__REPEAT_10000_2(f, x ## 7); \
|
|
__REPEAT_10000_2(f, x ## 8); \
|
|
__REPEAT_10000_2(f, x ## 9)
|
|
#define REPEAT_10000(f) \
|
|
__REPEAT_10000_1(f, 0); \
|
|
__REPEAT_10000_1(f, 1); \
|
|
__REPEAT_10000_1(f, 2); \
|
|
__REPEAT_10000_1(f, 3); \
|
|
__REPEAT_10000_1(f, 4); \
|
|
__REPEAT_10000_1(f, 5); \
|
|
__REPEAT_10000_1(f, 6); \
|
|
__REPEAT_10000_1(f, 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
|