[norov:fns 14/24] include/linux/nodemask.h:281:16: error: too many arguments to function 'find_next_bit_wrap'

From: kernel test robot
Date: Sat Jun 25 2022 - 23:25:56 EST


tree: https://github.com/norov/linux fns
head: c6f11d769095eb58ae2f05e3df1d8e71b7ccc5d7
commit: 2578c583b93e113c3f4bab20524203227add8495 [14/24] find_next_bit_wrap
config: x86_64-rhel-8.3-kselftests
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/norov/linux/commit/2578c583b93e113c3f4bab20524203227add8495
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov fns
git checkout 2578c583b93e113c3f4bab20524203227add8495
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 prepare

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

Note: the norov/fns HEAD c6f11d769095eb58ae2f05e3df1d8e71b7ccc5d7 builds fine.
It only hurts bisectability.

All errors (new ones prefixed by >>):

In file included from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:22,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/slab.h:18,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/find.h: In function '_find_next_bit_wrap':
include/linux/find.h:30:24: error: implicit declaration of function 'find_next_bit'; did you mean '_find_next_bit'? [-Werror=implicit-function-declaration]
30 | from = find_next_bit(addr, to, from);
| ^~~~~~~~~~~~~
| _find_next_bit
include/linux/find.h:38:16: error: implicit declaration of function 'find_first_bit'; did you mean '_find_first_bit'? [-Werror=implicit-function-declaration]
38 | from = find_first_bit(addr, to);
| ^~~~~~~~~~~~~~
| _find_first_bit
include/linux/find.h: At top level:
include/linux/find.h:69:15: error: conflicting types for 'find_next_bit'; have 'long unsigned int(const long unsigned int *, long unsigned int, long unsigned int)'
69 | unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
| ^~~~~~~~~~~~~
include/linux/find.h:30:24: note: previous implicit declaration of 'find_next_bit' with type 'int()'
30 | from = find_next_bit(addr, to, from);
| ^~~~~~~~~~~~~
include/linux/find.h:154:15: error: conflicting types for 'find_first_bit'; have 'long unsigned int(const long unsigned int *, long unsigned int)'
154 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
include/linux/find.h:38:16: note: previous implicit declaration of 'find_first_bit' with type 'int()'
38 | from = find_first_bit(addr, to);
| ^~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:17,
from include/linux/gfp.h:6,
from include/linux/percpu-refcount.h:57,
from include/linux/slab.h:19,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/nodemask.h: In function '__next_node_in':
include/linux/nodemask.h:281:61: error: 'n' undeclared (first use in this function)
281 | return find_next_bit_wrap(srcp->bits, MAX_NUMNODES, n+1, n+1);
| ^
include/linux/nodemask.h:281:61: note: each undeclared identifier is reported only once for each function it appears in
>> include/linux/nodemask.h:281:16: error: too many arguments to function 'find_next_bit_wrap'
281 | return find_next_bit_wrap(srcp->bits, MAX_NUMNODES, n+1, n+1);
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/cpumask.h:5,
from arch/x86/include/asm/msr.h:11,
from arch/x86/include/asm/processor.h:22,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/slab.h:18,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/find.h:52:15: note: declared here
52 | unsigned long find_next_bit_wrap(const unsigned long *addr, unsigned long size,
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.


vim +/find_next_bit_wrap +281 include/linux/nodemask.h

273
274 /*
275 * Find the next present node in src, starting after node n, wrapping around to
276 * the first node in src if needed. Returns MAX_NUMNODES if src is empty.
277 */
278 #define next_node_in(n, src) __next_node_in((n), &(src))
279 static inline unsigned int __next_node_in(int node, const nodemask_t *srcp)
280 {
> 281 return find_next_bit_wrap(srcp->bits, MAX_NUMNODES, n+1, n+1);
282 }
283

--
0-DAY CI Kernel Test Service
https://01.org/lkp