All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: kbuild-all@01.org, Jakub Kicinski <jakub.kicinski@netronome.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	kbuild test robot <fengguang.wu@intel.com>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2()
Date: Tue, 10 Oct 2017 06:57:12 +0800	[thread overview]
Message-ID: <201710100627.lAtWacmj%fengguang.wu@intel.com> (raw)
In-Reply-To: <1507538449-22775-1-git-send-email-geert+renesas@glider.be>

[-- 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 --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, Jakub Kicinski <jakub.kicinski@netronome.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	kbuild test robot <fengguang.wu@intel.com>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2()
Date: Tue, 10 Oct 2017 06:57:12 +0800	[thread overview]
Message-ID: <201710100627.lAtWacmj%fengguang.wu@intel.com> (raw)
In-Reply-To: <1507538449-22775-1-git-send-email-geert+renesas@glider.be>

[-- 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 --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: kbuild-all@01.org, Jakub Kicinski <jakub.kicinski@netronome.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	kbuild test robot <fengguang.wu@intel.com>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2()
Date: Tue, 10 Oct 2017 06:57:12 +0800	[thread overview]
Message-ID: <201710100627.lAtWacmj%fengguang.wu@intel.com> (raw)
Message-ID: <20171009225712.muG6GhgiRo8e08weooAmf5XDuPD29NidbZMJoMas47M@z> (raw)
In-Reply-To: <1507538449-22775-1-git-send-email-geert+renesas@glider.be>

[-- 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 --]

  parent reply	other threads:[~2017-10-09 22:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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:37   ` kbuild test robot
2017-10-09 22:37   ` kbuild test robot
2017-10-09 22:53 ` Jakub Kicinski
2017-10-10  7:03   ` Geert Uytterhoeven
2017-10-10  7:03     ` Geert Uytterhoeven
2017-10-10 15:06     ` Jakub Kicinski
2017-10-09 22:57 ` kbuild test robot [this message]
2017-10-09 22:57   ` kbuild test robot
2017-10-09 22:57   ` kbuild test robot

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=201710100627.lAtWacmj%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=fengguang.wu@intel.com \
    --cc=geert+renesas@glider.be \
    --cc=jakub.kicinski@netronome.com \
    --cc=kbuild-all@01.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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.