* Re: [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2()
2017-10-09 8:40 [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2() Geert Uytterhoeven
2017-10-09 14:34 ` Jakub Kicinski
@ 2017-10-09 22:37 ` kbuild test robot
2017-10-09 22:53 ` Jakub Kicinski
2017-10-09 22:57 ` kbuild test robot
3 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2017-10-09 22:37 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: kbuild-all, Jakub Kicinski, Arnd Bergmann, Andrew Morton,
kbuild test robot, linux-arch, linux-kernel, Geert Uytterhoeven
[-- Attachment #1: Type: text/plain, Size: 28509 bytes --]
Hi Geert,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.14-rc4]
[cannot apply to next-20170929]
[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/Geert-Uytterhoeven/bitfield-Use-__ffs64-x-to-fix-missing-__ffsdi2/20171010-050009
config: x86_64-allyesdebian (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from net/mac80211/sta_info.c:12:
In function 'sta_stats_decode_rate',
inlined from 'sta_set_rate_info_rx' at net/mac80211/sta_info.c:2016:2,
inlined from 'sta_set_sinfo' at net/mac80211/sta_info.c:2218:7:
>> include/linux/compiler.h:576:38: error: call to '__compiletime_assert_1971' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))) + (1ULL << __ffs64((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))))) & ((((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))) + (1ULL << __ffs64((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:764:32: note: in expansion of macro 'FIELD_GET'
#define STA_STATS_GET(_n, _v) FIELD_GET(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~
>> net/mac80211/sta_info.c:1971:14: note: in expansion of macro 'STA_STATS_GET'
rinfo->bw = STA_STATS_GET(BW, rate);
^~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_1973' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) & ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:764:32: note: in expansion of macro 'FIELD_GET'
#define STA_STATS_GET(_n, _v) FIELD_GET(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~
net/mac80211/sta_info.c:1973:10: note: in expansion of macro 'STA_STATS_GET'
switch (STA_STATS_GET(TYPE, rate)) {
^~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_1976' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))) + (1ULL << __ffs64((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))))) & ((((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))) + (1ULL << __ffs64((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:764:32: note: in expansion of macro 'FIELD_GET'
#define STA_STATS_GET(_n, _v) FIELD_GET(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~
net/mac80211/sta_info.c:1976:16: note: in expansion of macro 'STA_STATS_GET'
rinfo->mcs = STA_STATS_GET(VHT_MCS, rate);
^~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_1977' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))) + (1ULL << __ffs64((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))))) & ((((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))) + (1ULL << __ffs64((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:764:32: note: in expansion of macro 'FIELD_GET'
#define STA_STATS_GET(_n, _v) FIELD_GET(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~
net/mac80211/sta_info.c:1977:16: note: in expansion of macro 'STA_STATS_GET'
rinfo->nss = STA_STATS_GET(VHT_NSS, rate);
^~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_1978' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))) + (1ULL << __ffs64((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))))) & ((((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))) + (1ULL << __ffs64((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/uapi/linux/sysinfo.h:4,
from include/uapi/linux/kernel.h:4,
from include/linux/cache.h:4,
from include/linux/jiffies.h:4,
from net/mac80211/rx.c:14:
net/mac80211/sta_info.h: In function 'sta_stats_encode_rate':
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_772' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))) + (1ULL << __ffs64((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))))) & ((((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))) + (1ULL << __ffs64((((~0UL) - (1UL << (8)) + 1) & (~0UL >> (64 - 1 - (11))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:763:34: note: in expansion of macro 'FIELD_PREP'
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~~
>> net/mac80211/sta_info.h:772:6: note: in expansion of macro 'STA_STATS_FIELD'
r = STA_STATS_FIELD(BW, s->bw);
^~~~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_775' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))) + (1ULL << __ffs64((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))))) & ((((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))) + (1ULL << __ffs64((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:57:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:763:34: note: in expansion of macro 'FIELD_PREP'
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~~
net/mac80211/sta_info.h:775:8: note: in expansion of macro 'STA_STATS_FIELD'
r |= STA_STATS_FIELD(SGI, 1);
^~~~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_775' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))) + (1ULL << __ffs64((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))))) & ((((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))) + (1ULL << __ffs64((((~0UL) - (1UL << (12)) + 1) & (~0UL >> (64 - 1 - (12))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:763:34: note: in expansion of macro 'FIELD_PREP'
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~~
net/mac80211/sta_info.h:775:8: note: in expansion of macro 'STA_STATS_FIELD'
r |= STA_STATS_FIELD(SGI, 1);
^~~~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_779' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) & ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:57:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:763:34: note: in expansion of macro 'FIELD_PREP'
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~~
net/mac80211/sta_info.h:779:8: note: in expansion of macro 'STA_STATS_FIELD'
r |= STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_VHT);
^~~~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_779' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) & ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:763:34: note: in expansion of macro 'FIELD_PREP'
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~~
net/mac80211/sta_info.h:779:8: note: in expansion of macro 'STA_STATS_FIELD'
r |= STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_VHT);
^~~~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_780' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))) + (1ULL << __ffs64((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))))) & ((((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))) + (1ULL << __ffs64((((~0UL) - (1UL << (4)) + 1) & (~0UL >> (64 - 1 - (7))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:763:34: note: in expansion of macro 'FIELD_PREP'
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~~
net/mac80211/sta_info.h:780:8: note: in expansion of macro 'STA_STATS_FIELD'
r |= STA_STATS_FIELD(VHT_NSS, s->nss);
^~~~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_781' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))) + (1ULL << __ffs64((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))))) & ((((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))) + (1ULL << __ffs64((((~0UL) - (1UL << (0)) + 1) & (~0UL >> (64 - 1 - (3))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> net/mac80211/sta_info.h:763:34: note: in expansion of macro 'FIELD_PREP'
#define STA_STATS_FIELD(_n, _v) FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
^~~~~~~~~~
net/mac80211/sta_info.h:781:8: note: in expansion of macro 'STA_STATS_FIELD'
r |= STA_STATS_FIELD(VHT_MCS, s->rate_idx);
^~~~~~~~~~~~~~~
include/linux/compiler.h:576:38: error: call to '__compiletime_assert_784' declared with attribute error: BUILD_BUG_ON failed: ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) & ((((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))) + (1ULL << __ffs64((((~0UL) - (1UL << (13)) + 1) & (~0UL >> (64 - 1 - (15))))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
vim +/__compiletime_assert_1971 +576 include/linux/compiler.h
9a8ab1c3 Daniel Santos 2013-02-21 562
9a8ab1c3 Daniel Santos 2013-02-21 563 #define _compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c3 Daniel Santos 2013-02-21 564 __compiletime_assert(condition, msg, prefix, suffix)
9a8ab1c3 Daniel Santos 2013-02-21 565
9a8ab1c3 Daniel Santos 2013-02-21 566 /**
9a8ab1c3 Daniel Santos 2013-02-21 567 * compiletime_assert - break build and emit msg if condition is false
9a8ab1c3 Daniel Santos 2013-02-21 568 * @condition: a compile-time constant condition to check
9a8ab1c3 Daniel Santos 2013-02-21 569 * @msg: a message to emit if condition is false
9a8ab1c3 Daniel Santos 2013-02-21 570 *
9a8ab1c3 Daniel Santos 2013-02-21 571 * In tradition of POSIX assert, this macro will break the build if the
9a8ab1c3 Daniel Santos 2013-02-21 572 * supplied condition is *false*, emitting the supplied error message if the
9a8ab1c3 Daniel Santos 2013-02-21 573 * compiler has support to do so.
9a8ab1c3 Daniel Santos 2013-02-21 574 */
9a8ab1c3 Daniel Santos 2013-02-21 575 #define compiletime_assert(condition, msg) \
9a8ab1c3 Daniel Santos 2013-02-21 @576 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
9a8ab1c3 Daniel Santos 2013-02-21 577
:::::: The code at line 576 was first introduced by commit
:::::: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG
:::::: TO: Daniel Santos <daniel.santos@pobox.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39531 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2()
2017-10-09 8:40 [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2() Geert Uytterhoeven
` (2 preceding siblings ...)
2017-10-09 22:53 ` Jakub Kicinski
@ 2017-10-09 22:57 ` kbuild test robot
3 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2017-10-09 22:57 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: kbuild-all, Jakub Kicinski, Arnd Bergmann, Andrew Morton,
kbuild test robot, linux-arch, linux-kernel, Geert Uytterhoeven
[-- Attachment #1: Type: text/plain, Size: 10959 bytes --]
Hi Geert,
[auto build test ERROR on linus/master]
[also build test ERROR on v4.14-rc4]
[cannot apply to next-20171009]
[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/Geert-Uytterhoeven/bitfield-Use-__ffs64-x-to-fix-missing-__ffsdi2/20171010-050009
config: x86_64-allyesdebian (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/current.h:4:0,
from include/linux/sched.h:11,
from drivers/net/wireless/intel/iwlwifi/pcie/rx.c:31:
In function 'iwl_pcie_rx_mq_hw_init',
inlined from 'iwl_pcie_rx_init' at drivers/net/wireless/intel/iwlwifi/pcie/rx.c:976:3:
>> include/linux/compiler.h:576:38: error: call to '__compiletime_assert_857' declared with attribute error: BUILD_BUG_ON failed: (((0xF00) + (1ULL << __ffs64(0xF00))) & (((0xF00) + (1ULL << __ffs64(0xF00))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/iwl-fh.h:487:34: note: in expansion of macro 'FIELD_PREP'
#define RFH_GEN_CFG_VAL(_n, _v) FIELD_PREP(RFH_GEN_CFG_ ## _n, _v)
^~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/pcie/rx.c:857:11: note: in expansion of macro 'RFH_GEN_CFG_VAL'
RFH_GEN_CFG_VAL(DEFAULT_RXQ_NUM, 0) |
^~~~~~~~~~~~~~~
>> include/linux/compiler.h:576:38: error: call to '__compiletime_assert_862' declared with attribute error: BUILD_BUG_ON failed: ((((1UL << (4))) + (1ULL << __ffs64((1UL << (4))))) & ((((1UL << (4))) + (1ULL << __ffs64((1UL << (4))))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/iwl-fh.h:487:34: note: in expansion of macro 'FIELD_PREP'
#define RFH_GEN_CFG_VAL(_n, _v) FIELD_PREP(RFH_GEN_CFG_ ## _n, _v)
^~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/pcie/rx.c:859:11: note: in expansion of macro 'RFH_GEN_CFG_VAL'
RFH_GEN_CFG_VAL(RB_CHUNK_SIZE,
^~~~~~~~~~~~~~~
--
In file included from include/linux/linkage.h:4:0,
from include/linux/kernel.h:6,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:23,
from include/linux/etherdevice.h:25,
from drivers/net/wireless/intel/iwlwifi/pcie/tx.c:31:
drivers/net/wireless/intel/iwlwifi/pcie/tx.c: In function 'iwl_trans_pcie_txq_enable':
>> include/linux/compiler.h:576:38: error: call to '__compiletime_assert_1368' declared with attribute error: BUILD_BUG_ON failed: ((((0x0000007F)) + (1ULL << __ffs64((0x0000007F)))) & ((((0x0000007F)) + (1ULL << __ffs64((0x0000007F)))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/iwl-prph.h:256:41: note: in expansion of macro 'FIELD_PREP'
#define SCD_QUEUE_CTX_REG2_VAL(_n, _v) FIELD_PREP(SCD_QUEUE_CTX_REG2_ ## _n, _v)
^~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/pcie/tx.c:1368:4: note: in expansion of macro 'SCD_QUEUE_CTX_REG2_VAL'
SCD_QUEUE_CTX_REG2_VAL(WIN_SIZE, frame_limit) |
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compiler.h:576:38: error: call to '__compiletime_assert_1369' declared with attribute error: BUILD_BUG_ON failed: ((((0x007F0000)) + (1ULL << __ffs64((0x007F0000)))) & ((((0x007F0000)) + (1ULL << __ffs64((0x007F0000)))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:556:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:576:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:46:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:70:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
include/linux/build_bug.h:19:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
^~~~~~~~~~~~
include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
__BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:89:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~
>> drivers/net/wireless/intel/iwlwifi/iwl-prph.h:256:41: note: in expansion of macro 'FIELD_PREP'
#define SCD_QUEUE_CTX_REG2_VAL(_n, _v) FIELD_PREP(SCD_QUEUE_CTX_REG2_ ## _n, _v)
^~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/pcie/tx.c:1369:4: note: in expansion of macro 'SCD_QUEUE_CTX_REG2_VAL'
SCD_QUEUE_CTX_REG2_VAL(FRAME_LIMIT, frame_limit));
^~~~~~~~~~~~~~~~~~~~~~
vim +/__compiletime_assert_857 +576 include/linux/compiler.h
9a8ab1c3 Daniel Santos 2013-02-21 562
9a8ab1c3 Daniel Santos 2013-02-21 563 #define _compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c3 Daniel Santos 2013-02-21 564 __compiletime_assert(condition, msg, prefix, suffix)
9a8ab1c3 Daniel Santos 2013-02-21 565
9a8ab1c3 Daniel Santos 2013-02-21 566 /**
9a8ab1c3 Daniel Santos 2013-02-21 567 * compiletime_assert - break build and emit msg if condition is false
9a8ab1c3 Daniel Santos 2013-02-21 568 * @condition: a compile-time constant condition to check
9a8ab1c3 Daniel Santos 2013-02-21 569 * @msg: a message to emit if condition is false
9a8ab1c3 Daniel Santos 2013-02-21 570 *
9a8ab1c3 Daniel Santos 2013-02-21 571 * In tradition of POSIX assert, this macro will break the build if the
9a8ab1c3 Daniel Santos 2013-02-21 572 * supplied condition is *false*, emitting the supplied error message if the
9a8ab1c3 Daniel Santos 2013-02-21 573 * compiler has support to do so.
9a8ab1c3 Daniel Santos 2013-02-21 574 */
9a8ab1c3 Daniel Santos 2013-02-21 575 #define compiletime_assert(condition, msg) \
9a8ab1c3 Daniel Santos 2013-02-21 @576 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
9a8ab1c3 Daniel Santos 2013-02-21 577
:::::: The code at line 576 was first introduced by commit
:::::: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG
:::::: TO: Daniel Santos <daniel.santos@pobox.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39531 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread