[norov:bitmap-fast7 3/9] drivers/iio/adc/mxs-lradc-adc.c:563:52: error: use of undeclared identifier 'LRADC_MAX_MAPPED_CHAN'
From: kernel test robot
Date: Sun Nov 28 2021 - 01:37:48 EST
tree: https://github.com/norov/linux bitmap-fast7
head: 21de62a46d4806527ba13c148c7d96a26f1a69e7
commit: 7a4a8dc6adcf9ce8680e675df2cccb20f964d4e3 [3/9] all: replace bitmap_weigth() with bitmap_{empty,full,eq,gt,le}
config: hexagon-buildonly-randconfig-r003-20211128 (https://download.01.org/0day-ci/archive/20211128/202111281438.kbhQCbqW-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5c64d8ef8cc0c0ed3e0f2ae693d99e7f70f20a84)
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/7a4a8dc6adcf9ce8680e675df2cccb20f964d4e3
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov bitmap-fast7
git checkout 7a4a8dc6adcf9ce8680e675df2cccb20f964d4e3
# 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/iio/adc/
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/iio/adc/mxs-lradc-adc.c:563:52: error: use of undeclared identifier 'LRADC_MAX_MAPPED_CHAN'
if (bitmap_weight_gt(mask, LRADC_MAX_TOTAL_CHANS, LRADC_MAX_MAPPED_CHAN - rsvd_chans)
^
>> drivers/iio/adc/mxs-lradc-adc.c:564:3: error: expected ')'
return false;
^
drivers/iio/adc/mxs-lradc-adc.c:563:5: note: to match this '('
if (bitmap_weight_gt(mask, LRADC_MAX_TOTAL_CHANS, LRADC_MAX_MAPPED_CHAN - rsvd_chans)
^
2 errors generated.
vim +/LRADC_MAX_MAPPED_CHAN +563 drivers/iio/adc/mxs-lradc-adc.c
537
538 static bool mxs_lradc_adc_validate_scan_mask(struct iio_dev *iio,
539 const unsigned long *mask)
540 {
541 struct mxs_lradc_adc *adc = iio_priv(iio);
542 struct mxs_lradc *lradc = adc->lradc;
543 int rsvd_chans = 0;
544 unsigned long rsvd_mask = 0;
545
546 if (lradc->use_touchbutton)
547 rsvd_mask |= CHAN_MASK_TOUCHBUTTON;
548 if (lradc->touchscreen_wire == MXS_LRADC_TOUCHSCREEN_4WIRE)
549 rsvd_mask |= CHAN_MASK_TOUCHSCREEN_4WIRE;
550 if (lradc->touchscreen_wire == MXS_LRADC_TOUCHSCREEN_5WIRE)
551 rsvd_mask |= CHAN_MASK_TOUCHSCREEN_5WIRE;
552
553 if (lradc->use_touchbutton)
554 rsvd_chans++;
555 if (lradc->touchscreen_wire)
556 rsvd_chans += 2;
557
558 /* Test for attempts to map channels with special mode of operation. */
559 if (bitmap_intersects(mask, &rsvd_mask, LRADC_MAX_TOTAL_CHANS))
560 return false;
561
562 /* Test for attempts to map more channels then available slots. */
> 563 if (bitmap_weight_gt(mask, LRADC_MAX_TOTAL_CHANS, LRADC_MAX_MAPPED_CHAN - rsvd_chans)
> 564 return false;
565
566 return true;
567 }
568
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx