From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [norov:remove-find-h 13/15] arch/m68k/include/asm/bitops.h:396:24: error: conflicting types for 'find_first_bit'
Date: Tue, 23 Mar 2021 15:37:44 +0800 [thread overview]
Message-ID: <202103231538.YbDDOa6y-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 14974 bytes --]
tree: https://github.com/norov/linux remove-find-h
head: a3a1691cca887a386a029d858a3d69cbb3e3843f
commit: c17320c8f35578470da69fe0a4e5eb9e7a2c7fb6 [13/15] remove GENERIC_FIND_FIRST_BIT
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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/norov/linux/commit/c17320c8f35578470da69fe0a4e5eb9e7a2c7fb6
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov remove-find-h
git checkout c17320c8f35578470da69fe0a4e5eb9e7a2c7fb6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> arch/m68k/include/asm/bitops.h:396:24: error: conflicting types for 'find_first_bit'
396 | #define find_first_bit find_first_bit
| ^~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:107:15: note: in expansion of macro 'find_first_bit'
107 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:373:19: note: previous definition of 'find_first_bit' was here
373 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
| ^~~~~~~~~~~~~~
>> arch/m68k/include/asm/bitops.h:341:29: error: conflicting types for 'find_first_zero_bit'
341 | #define find_first_zero_bit find_first_zero_bit
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:127:15: note: in expansion of macro 'find_first_zero_bit'
127 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:317:19: note: previous definition of 'find_first_zero_bit' was here
317 | static inline int find_first_zero_bit(const unsigned long *vaddr,
| ^~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from arch/m68k/emu/nfblock.c:9:
>> arch/m68k/include/asm/bitops.h:396:24: error: conflicting types for 'find_first_bit'
396 | #define find_first_bit find_first_bit
| ^~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:107:15: note: in expansion of macro 'find_first_bit'
107 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:373:19: note: previous definition of 'find_first_bit' was here
373 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
| ^~~~~~~~~~~~~~
>> arch/m68k/include/asm/bitops.h:341:29: error: conflicting types for 'find_first_zero_bit'
341 | #define find_first_zero_bit find_first_zero_bit
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:127:15: note: in expansion of macro 'find_first_zero_bit'
127 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:317:19: note: previous definition of 'find_first_zero_bit' was here
317 | static inline int find_first_zero_bit(const unsigned long *vaddr,
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/mmzone.h:19,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from arch/m68k/emu/nfblock.c:9:
include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
6 | #include <generated/bounds.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
--
In file included from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> arch/m68k/include/asm/bitops.h:396:24: error: conflicting types for 'find_first_bit'
396 | #define find_first_bit find_first_bit
| ^~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:107:15: note: in expansion of macro 'find_first_bit'
107 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:373:19: note: previous definition of 'find_first_bit' was here
373 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
| ^~~~~~~~~~~~~~
>> arch/m68k/include/asm/bitops.h:341:29: error: conflicting types for 'find_first_zero_bit'
341 | #define find_first_zero_bit find_first_zero_bit
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:127:15: note: in expansion of macro 'find_first_zero_bit'
127 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:317:19: note: previous definition of 'find_first_zero_bit' was here
317 | static inline int find_first_zero_bit(const unsigned long *vaddr,
| ^~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:118: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1329: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
error: no override and no default toolchain set
init/Kconfig:67:warning: 'RUSTC_VERSION': number is invalid
In file included from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> arch/m68k/include/asm/bitops.h:396:24: error: conflicting types for 'find_first_bit'
396 | #define find_first_bit find_first_bit
| ^~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:107:15: note: in expansion of macro 'find_first_bit'
107 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:373:19: note: previous definition of 'find_first_bit' was here
373 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
| ^~~~~~~~~~~~~~
>> arch/m68k/include/asm/bitops.h:341:29: error: conflicting types for 'find_first_zero_bit'
341 | #define find_first_zero_bit find_first_zero_bit
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:127:15: note: in expansion of macro 'find_first_zero_bit'
127 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:317:19: note: previous definition of 'find_first_zero_bit' was here
317 | static inline int find_first_zero_bit(const unsigned long *vaddr,
| ^~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:118: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1329: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/find_first_bit +396 arch/m68k/include/asm/bitops.h
171d809df1896c Greg Ungerer 2011-05-17 316
171d809df1896c Greg Ungerer 2011-05-17 317 static inline int find_first_zero_bit(const unsigned long *vaddr,
171d809df1896c Greg Ungerer 2011-05-17 318 unsigned size)
171d809df1896c Greg Ungerer 2011-05-17 319 {
171d809df1896c Greg Ungerer 2011-05-17 320 const unsigned long *p = vaddr;
171d809df1896c Greg Ungerer 2011-05-17 321 int res = 32;
171d809df1896c Greg Ungerer 2011-05-17 322 unsigned int words;
171d809df1896c Greg Ungerer 2011-05-17 323 unsigned long num;
171d809df1896c Greg Ungerer 2011-05-17 324
171d809df1896c Greg Ungerer 2011-05-17 325 if (!size)
171d809df1896c Greg Ungerer 2011-05-17 326 return 0;
171d809df1896c Greg Ungerer 2011-05-17 327
171d809df1896c Greg Ungerer 2011-05-17 328 words = (size + 31) >> 5;
171d809df1896c Greg Ungerer 2011-05-17 329 while (!(num = ~*p++)) {
171d809df1896c Greg Ungerer 2011-05-17 330 if (!--words)
171d809df1896c Greg Ungerer 2011-05-17 331 goto out;
171d809df1896c Greg Ungerer 2011-05-17 332 }
171d809df1896c Greg Ungerer 2011-05-17 333
171d809df1896c Greg Ungerer 2011-05-17 334 __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
171d809df1896c Greg Ungerer 2011-05-17 335 : "=d" (res) : "d" (num & -num));
171d809df1896c Greg Ungerer 2011-05-17 336 res ^= 31;
171d809df1896c Greg Ungerer 2011-05-17 337 out:
171d809df1896c Greg Ungerer 2011-05-17 338 res += ((long)p - (long)vaddr - 4) * 8;
171d809df1896c Greg Ungerer 2011-05-17 339 return res < size ? res : size;
171d809df1896c Greg Ungerer 2011-05-17 340 }
171d809df1896c Greg Ungerer 2011-05-17 @341 #define find_first_zero_bit find_first_zero_bit
171d809df1896c Greg Ungerer 2011-05-17 342
171d809df1896c Greg Ungerer 2011-05-17 343 static inline int find_next_zero_bit(const unsigned long *vaddr, int size,
171d809df1896c Greg Ungerer 2011-05-17 344 int offset)
171d809df1896c Greg Ungerer 2011-05-17 345 {
171d809df1896c Greg Ungerer 2011-05-17 346 const unsigned long *p = vaddr + (offset >> 5);
171d809df1896c Greg Ungerer 2011-05-17 347 int bit = offset & 31UL, res;
171d809df1896c Greg Ungerer 2011-05-17 348
171d809df1896c Greg Ungerer 2011-05-17 349 if (offset >= size)
171d809df1896c Greg Ungerer 2011-05-17 350 return size;
171d809df1896c Greg Ungerer 2011-05-17 351
171d809df1896c Greg Ungerer 2011-05-17 352 if (bit) {
171d809df1896c Greg Ungerer 2011-05-17 353 unsigned long num = ~*p++ & (~0UL << bit);
171d809df1896c Greg Ungerer 2011-05-17 354 offset -= bit;
171d809df1896c Greg Ungerer 2011-05-17 355
171d809df1896c Greg Ungerer 2011-05-17 356 /* Look for zero in first longword */
171d809df1896c Greg Ungerer 2011-05-17 357 __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
171d809df1896c Greg Ungerer 2011-05-17 358 : "=d" (res) : "d" (num & -num));
171d809df1896c Greg Ungerer 2011-05-17 359 if (res < 32) {
171d809df1896c Greg Ungerer 2011-05-17 360 offset += res ^ 31;
171d809df1896c Greg Ungerer 2011-05-17 361 return offset < size ? offset : size;
171d809df1896c Greg Ungerer 2011-05-17 362 }
171d809df1896c Greg Ungerer 2011-05-17 363 offset += 32;
171d809df1896c Greg Ungerer 2011-05-17 364
171d809df1896c Greg Ungerer 2011-05-17 365 if (offset >= size)
171d809df1896c Greg Ungerer 2011-05-17 366 return size;
171d809df1896c Greg Ungerer 2011-05-17 367 }
171d809df1896c Greg Ungerer 2011-05-17 368 /* No zero yet, search remaining full bytes for a zero */
171d809df1896c Greg Ungerer 2011-05-17 369 return offset + find_first_zero_bit(p, size - offset);
171d809df1896c Greg Ungerer 2011-05-17 370 }
171d809df1896c Greg Ungerer 2011-05-17 371 #define find_next_zero_bit find_next_zero_bit
171d809df1896c Greg Ungerer 2011-05-17 372
171d809df1896c Greg Ungerer 2011-05-17 373 static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
171d809df1896c Greg Ungerer 2011-05-17 374 {
171d809df1896c Greg Ungerer 2011-05-17 375 const unsigned long *p = vaddr;
171d809df1896c Greg Ungerer 2011-05-17 376 int res = 32;
171d809df1896c Greg Ungerer 2011-05-17 377 unsigned int words;
171d809df1896c Greg Ungerer 2011-05-17 378 unsigned long num;
171d809df1896c Greg Ungerer 2011-05-17 379
171d809df1896c Greg Ungerer 2011-05-17 380 if (!size)
171d809df1896c Greg Ungerer 2011-05-17 381 return 0;
171d809df1896c Greg Ungerer 2011-05-17 382
171d809df1896c Greg Ungerer 2011-05-17 383 words = (size + 31) >> 5;
171d809df1896c Greg Ungerer 2011-05-17 384 while (!(num = *p++)) {
171d809df1896c Greg Ungerer 2011-05-17 385 if (!--words)
171d809df1896c Greg Ungerer 2011-05-17 386 goto out;
171d809df1896c Greg Ungerer 2011-05-17 387 }
171d809df1896c Greg Ungerer 2011-05-17 388
171d809df1896c Greg Ungerer 2011-05-17 389 __asm__ __volatile__ ("bfffo %1{#0,#0},%0"
171d809df1896c Greg Ungerer 2011-05-17 390 : "=d" (res) : "d" (num & -num));
171d809df1896c Greg Ungerer 2011-05-17 391 res ^= 31;
171d809df1896c Greg Ungerer 2011-05-17 392 out:
171d809df1896c Greg Ungerer 2011-05-17 393 res += ((long)p - (long)vaddr - 4) * 8;
171d809df1896c Greg Ungerer 2011-05-17 394 return res < size ? res : size;
171d809df1896c Greg Ungerer 2011-05-17 395 }
171d809df1896c Greg Ungerer 2011-05-17 @396 #define find_first_bit find_first_bit
171d809df1896c Greg Ungerer 2011-05-17 397
:::::: The code@line 396 was first introduced by commit
:::::: 171d809df1896c1022f9778cd2788be6c255a7dc m68k: merge mmu and non-mmu bitops.h
:::::: TO: Greg Ungerer <gerg@uclinux.org>
:::::: CC: Greg Ungerer <gerg@uclinux.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60187 bytes --]
reply other threads:[~2021-03-23 7:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202103231538.YbDDOa6y-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.