lkml.org 
[lkml]   [2022]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[norov:fns 24/24] lib/test_bitmap.c:226:37: error: 'EXP1_IN_BITS' undeclared
tree:   https://github.com/norov/linux fns
head: c6f11d769095eb58ae2f05e3df1d8e71b7ccc5d7
commit: c6f11d769095eb58ae2f05e3df1d8e71b7ccc5d7 [24/24] fixes
config: ia64-randconfig-r011-20220626
compiler: ia64-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/norov/linux/commit/c6f11d769095eb58ae2f05e3df1d8e71b7ccc5d7
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov fns
git checkout c6f11d769095eb58ae2f05e3df1d8e71b7ccc5d7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

In file included from include/linux/bitmap.h:9,
from lib/test_bitmap.c:8:
lib/test_bitmap.c: In function 'test_find_nth_bit':
>> lib/test_bitmap.c:226:37: error: 'EXP1_IN_BITS' undeclared (first use in this function)
226 | for_each_set_bit(bit, exp1, EXP1_IN_BITS) {
| ^~~~~~~~~~~~
include/linux/find.h:345:45: note: in definition of macro 'for_each_set_bit'
345 | for ((bit) = find_next_bit((addr), (size), 0); \
| ^~~~
lib/test_bitmap.c:226:37: note: each undeclared identifier is reported only once for each function it appears in
226 | for_each_set_bit(bit, exp1, EXP1_IN_BITS) {
| ^~~~~~~~~~~~
include/linux/find.h:345:45: note: in definition of macro 'for_each_set_bit'
345 | for ((bit) = find_next_bit((addr), (size), 0); \
| ^~~~
lib/test_bitmap.c: In function 'test_find_next_bit_wrap':
lib/test_bitmap.c:234:53: error: 'EXP1_IN_BITS' undeclared (first use in this function)
234 | const unsigned long w = bitmap_weight(exp1, EXP1_IN_BITS);
| ^~~~~~~~~~~~
At top level:
lib/test_bitmap.c:232:20: warning: 'test_find_next_bit_wrap' defined but not used [-Wunused-function]
232 | static void __init test_find_next_bit_wrap(void)
| ^~~~~~~~~~~~~~~~~~~~~~~


vim +/EXP1_IN_BITS +226 lib/test_bitmap.c

221
222 static void __init test_find_nth_bit(void)
223 {
224 unsigned long b, bit, cnt = 0;
225
> 226 for_each_set_bit(bit, exp1, EXP1_IN_BITS) {
227 b = find_nth_bit(exp1, EXP1_IN_BITS, ++cnt);
228 expect_eq_uint(b, bit);
229 }
230 }
231

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

\
 
 \ /
  Last update: 2022-06-26 04:06    [W:0.029 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site