lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 10 Oct 2017 06:37:29 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Geert Uytterhoeven <geert+renesas@...der.be>
Cc:     kbuild-all@...org, Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Arnd Bergmann <arnd@...db.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        kbuild test robot <fengguang.wu@...el.com>,
        linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH] bitfield: Use __ffs64(x) to fix missing __ffsdi2()

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@...ox.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

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

Download attachment ".config.gz" of type "application/gzip" (39531 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ