[ulfh-mmc:next 20/24] drivers/memstick/core/ms_block.c:158:6: error: implicit declaration of function 'bitmap_weight_eq'

From: kernel test robot
Date: Thu Feb 17 2022 - 14:59:09 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next
head: 4b67100bafbb3f60e6eecf87631e4d400d9b6f17
commit: 5f8d171cd8a93ff425556e7fde5d59fefc677bf7 [20/24] memstick: replace bitmap_weight with bitmap_weight_eq where appropriate
config: hexagon-randconfig-r045-20220217 (https://download.01.org/0day-ci/archive/20220218/202202180327.nT5gZudK-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git/commit/?id=5f8d171cd8a93ff425556e7fde5d59fefc677bf7
git remote add ulfh-mmc git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
git fetch --no-tags ulfh-mmc next
git checkout 5f8d171cd8a93ff425556e7fde5d59fefc677bf7
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/memstick/core/

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

All errors (new ones prefixed by >>):

>> drivers/memstick/core/ms_block.c:158:6: error: implicit declaration of function 'bitmap_weight_eq' [-Werror,-Wimplicit-function-declaration]
if (bitmap_weight_eq(msb->used_blocks_bitmap, msb->block_count,
^
drivers/memstick/core/ms_block.c:158:6: note: did you mean 'bitmap_weight'?
include/linux/bitmap.h:399:28: note: 'bitmap_weight' declared here
static __always_inline int bitmap_weight(const unsigned long *src, unsigned int nbits)
^
1 error generated.


vim +/bitmap_weight_eq +158 drivers/memstick/core/ms_block.c

145
146 /* Debug test to validate free block counts */
147 static int msb_validate_used_block_bitmap(struct msb_data *msb)
148 {
149 int total_free_blocks = 0;
150 int i;
151
152 if (!debug)
153 return 0;
154
155 for (i = 0; i < msb->zone_count; i++)
156 total_free_blocks += msb->free_block_count[i];
157
> 158 if (bitmap_weight_eq(msb->used_blocks_bitmap, msb->block_count,
159 msb->block_count - total_free_blocks))
160 return 0;
161
162 pr_err("BUG: free block counts don't match the bitmap");
163 msb->read_only = true;
164 return -EINVAL;
165 }
166

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx