Hi Yury,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asm-generic/master]
[also build test ERROR on linux/master m68k/for-next linus/master hnaz-linux-mm/master
v5.12-rc5 next-20210331]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Yury-Norov/lib-find_bit-fast-pat...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git master
config: h8300-randconfig-r023-20210330 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.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/0day-ci/linux/commit/3e907bda2d6a980c07eae54c78a1162e1...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Yury-Norov/lib-find_bit-fast-path-for-small-bitmaps/20210401-083548
git checkout 3e907bda2d6a980c07eae54c78a1162e1c94cda1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/h8300/include/asm/bitops.h:167,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/find.h: In function 'find_last_bit':
> include/asm-generic/bitops/find.h:164:16: error: implicit
declaration of function '__fls'; did you mean '__ffs'?
[-Werror=implicit-function-declaration]
164 | return val ? __fls(val) :
size;
| ^~~~~
| __ffs
In file included from arch/h8300/include/asm/bitops.h:177,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/__fls.h: At top level:
> include/asm-generic/bitops/__fls.h:13:38: error: conflicting
types for '__fls'
13 | static __always_inline unsigned long
__fls(unsigned long word)
| ^~~~~
In file included from arch/h8300/include/asm/bitops.h:167,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/find.h:164:16: note: previous implicit declaration of
'__fls' was here
164 | return val ? __fls(val) : size;
| ^~~~~
cc1: some warnings being treated as errors
--
In file included from arch/h8300/include/asm/bitops.h:167,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/find.h: In function 'find_last_bit':
> include/asm-generic/bitops/find.h:164:16: error: implicit
declaration of function '__fls'; did you mean '__ffs'?
[-Werror=implicit-function-declaration]
164 | return val ? __fls(val) :
size;
| ^~~~~
| __ffs
In file included from arch/h8300/include/asm/bitops.h:177,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/__fls.h: At top level:
> include/asm-generic/bitops/__fls.h:13:38: error: conflicting
types for '__fls'
13 | static __always_inline unsigned long
__fls(unsigned long word)
| ^~~~~
In file included from arch/h8300/include/asm/bitops.h:167,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/find.h:164:16: note: previous implicit declaration of
'__fls' was here
164 | return val ? __fls(val) : size;
| ^~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: scripts/mod/devicetable-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1205: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from arch/h8300/include/asm/bitops.h:167,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/find.h: In function 'find_last_bit':
> include/asm-generic/bitops/find.h:164:16: error: implicit
declaration of function '__fls'; did you mean '__ffs'?
[-Werror=implicit-function-declaration]
164 | return val ? __fls(val) :
size;
| ^~~~~
| __ffs
In file included from arch/h8300/include/asm/bitops.h:177,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/__fls.h: At top level:
> include/asm-generic/bitops/__fls.h:13:38: error: conflicting
types for '__fls'
13 | static __always_inline unsigned long
__fls(unsigned long word)
| ^~~~~
In file included from arch/h8300/include/asm/bitops.h:167,
from include/linux/bitops.h:32,
from include/linux/log2.h:12,
from include/asm-generic/getorder.h:8,
from include/asm-generic/page.h:99,
from arch/h8300/include/asm/page.h:5,
from arch/h8300/include/asm/string.h:8,
from include/linux/string.h:21,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
include/asm-generic/bitops/find.h:164:16: note: previous implicit declaration of
'__fls' was here
164 | return val ? __fls(val) : size;
| ^~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: scripts/mod/devicetable-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1205: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +164 include/asm-generic/bitops/find.h
149
150 #ifndef find_last_bit
151 /**
152 * find_last_bit - find the last set bit in a memory region
153 * @addr: The address to start the search at
154 * @size: The number of bits to search
155 *
156 * Returns the bit number of the last set bit, or size.
157 */
158 static inline
159 unsigned long find_last_bit(const unsigned long *addr, unsigned long size)
160 {
161 if (small_const_nbits(size)) {
162 unsigned long val = *addr & GENMASK(size - 1, 0);
163
164 return val ? __fls(val) : size;
165 }
166
167 return _find_last_bit(addr, size);
168 }
169 #endif
170
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org