Re: [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2()
From: kbuild test robot
Date: Mon Oct 09 2017 - 18:58:41 EST
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@xxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip