Re: [tip: perf/core] tools headers: Synchronize linux/bits.h with the kernel sources

From: kbuild test robot
Date: Sun Aug 25 2019 - 14:37:13 EST


Hi tip-bot2,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc5 next-20190823]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/tip-bot2-for-Arnaldo-Carvalho-de-Melo/tools-headers-Synchronize-linux-bits-h-with-the-kernel-sources/20190826-001511
config: x86_64-randconfig-a004-201934 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

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

All errors (new ones prefixed by >>):

In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from builtin-check.c:18:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from builtin-check.c:18:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from builtin-orc.c:17:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from builtin-orc.c:17:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
cc1: all warnings being treated as errors
In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from check.c:10:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from check.c:10:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from orc_gen.c:10:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from check.h:10,
from orc_gen.c:10:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
mv: cannot stat 'tools/objtool/.builtin-check.o.tmp': No such file or directory
make[4]: *** [tools/objtool/builtin-check.o] Error 1
In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from elf.c:19:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from elf.c:19:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from warn.h:14,
from orc_dump.c:8:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from warn.h:14,
from orc_dump.c:8:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
cc1: all warnings being treated as errors
In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from special.h:10,
from special.c:15:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from elf.h:12,
from special.h:10,
from special.c:15:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
mv: cannot stat 'tools/objtool/.builtin-orc.o.tmp': No such file or directory
make[4]: *** [tools/objtool/builtin-orc.o] Error 1
cc1: all warnings being treated as errors
In file included from tools/include/linux/bitops.h:13:0,
from tools/include/linux/hashtable.h:13,
from arch/x86/../../elf.h:12,
from arch/x86/decode.c:14:
tools/include/asm-generic/bitops/non-atomic.h: In function '__set_bit':
>> tools/include/linux/bits.h:10:24: error: implicit declaration of function 'UL' [-Werror=implicit-function-declaration]
#define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
^
tools/include/asm-generic/bitops/non-atomic.h:18:23: note: in expansion of macro 'BIT_MASK'
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
In file included from tools/include/asm-generic/bitops.h:30:0,
from tools/include/linux/bitops.h:32,
from tools/include/linux/hashtable.h:13,
from arch/x86/../../elf.h:12,
from arch/x86/decode.c:14:
tools/include/asm-generic/bitops/non-atomic.h:18:2: error: nested extern declaration of 'UL' [-Werror=nested-externs]
unsigned long mask = BIT_MASK(nr);
^~~~~~~~
mv: cannot stat 'tools/objtool/.special.o.tmp': No such file or directory
make[4]: *** [tools/objtool/special.o] Error 1
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.orc_dump.o.tmp': No such file or directory
make[4]: *** [tools/objtool/orc_dump.o] Error 1
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.orc_gen.o.tmp': No such file or directory
make[4]: *** [tools/objtool/orc_gen.o] Error 1
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.elf.o.tmp': No such file or directory
make[4]: *** [tools/objtool/elf.o] Error 1
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/arch/x86/.decode.o.tmp': No such file or directory
make[5]: *** [tools/objtool/arch/x86/decode.o] Error 1
make[5]: Target '__build' not remade because of errors.
make[4]: *** [arch/x86] Error 2
cc1: all warnings being treated as errors
mv: cannot stat 'tools/objtool/.check.o.tmp': No such file or directory
make[4]: *** [tools/objtool/check.o] Error 1
make[4]: Target '__build' not remade because of errors.
make[3]: *** [tools/objtool/objtool-in.o] Error 2
make[3]: Target 'all' not remade because of errors.
make[2]: *** [objtool] Error 2
make[1]: *** [tools/objtool] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2
34 real 23 user 10 sys 100.03% cpu make prepare

vim +/UL +10 tools/include/linux/bits.h

7
8 #define BIT(nr) (UL(1) << (nr))
9 #define BIT_ULL(nr) (ULL(1) << (nr))
> 10 #define BIT_MASK(nr) (UL(1) << ((nr) % BITS_PER_LONG))
11 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
12 #define BIT_ULL_MASK(nr) (ULL(1) << ((nr) % BITS_PER_LONG_LONG))
13 #define BIT_ULL_WORD(nr) ((nr) / BITS_PER_LONG_LONG)
14 #define BITS_PER_BYTE 8
15

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip