[xilinx-xlnx:master 17/538] include/linux/compiler_types.h:315:45: error: call to '__compiletime_assert_300' declared with attribute error: FIELD_PREP: mask is not constant

kernel test robot lkp at intel.com
Sat May 21 10:21:49 PDT 2022


tree:   https://github.com/Xilinx/linux-xlnx master
head:   c29ce1f55c671aaac23bc1fc16e1fca1fcd2b9f3
commit: f2e88a581130a9b374ae8569ef37c642b60a14e8 [17/538] v4l: xilinx: dprxss: Add support for versal
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220522/202205220104.J7LvznuT-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/Xilinx/linux-xlnx/commit/f2e88a581130a9b374ae8569ef37c642b60a14e8
        git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xilinx-xlnx master
        git checkout f2e88a581130a9b374ae8569ef37c642b60a14e8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from <command-line>:
   drivers/media/platform/xilinx/xilinx-dprxss.c: In function 'xdprxss_clrset.constprop':
>> include/linux/compiler_types.h:315:45: error: call to '__compiletime_assert_300' declared with attribute error: FIELD_PREP: mask is not constant
     315 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:296:25: note: in definition of macro '__compiletime_assert'
     296 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:315:9: note: in expansion of macro '_compiletime_assert'
     315 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:46:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      46 |                 BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask),          \
         |                 ^~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/media/platform/xilinx/xilinx-dprxss.c:483:19: note: in expansion of macro 'FIELD_PREP'
     483 |         regval |= FIELD_PREP(clr_mask, set_data);
         |                   ^~~~~~~~~~
>> include/linux/compiler_types.h:315:45: error: call to '__compiletime_assert_304' declared with attribute error: BUILD_BUG_ON failed: (((clr_mask) + (1ULL << (__builtin_ffsll(clr_mask) - 1))) & (((clr_mask) + (1ULL << (__builtin_ffsll(clr_mask) - 1))) - 1)) != 0
     315 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:296:25: note: in definition of macro '__compiletime_assert'
     296 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:315:9: note: in expansion of macro '_compiletime_assert'
     315 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   include/linux/build_bug.h:21:9: note: in expansion of macro 'BUILD_BUG_ON'
      21 |         BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
         |         ^~~~~~~~~~~~
   include/linux/bitfield.h:54:17: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
      54 |                 __BUILD_BUG_ON_NOT_POWER_OF_2((_mask) +                 \
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_CHECK'
      94 |                 __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
         |                 ^~~~~~~~~~~~~~~~
   drivers/media/platform/xilinx/xilinx-dprxss.c:483:19: note: in expansion of macro 'FIELD_PREP'
     483 |         regval |= FIELD_PREP(clr_mask, set_data);
         |                   ^~~~~~~~~~


vim +/__compiletime_assert_300 +315 include/linux/compiler_types.h

eb5c2d4b45e3d2d Will Deacon 2020-07-21  301  
eb5c2d4b45e3d2d Will Deacon 2020-07-21  302  #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21  303  	__compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2d Will Deacon 2020-07-21  304  
eb5c2d4b45e3d2d Will Deacon 2020-07-21  305  /**
eb5c2d4b45e3d2d Will Deacon 2020-07-21  306   * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21  307   * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2d Will Deacon 2020-07-21  308   * @msg:       a message to emit if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21  309   *
eb5c2d4b45e3d2d Will Deacon 2020-07-21  310   * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21  311   * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21  312   * compiler has support to do so.
eb5c2d4b45e3d2d Will Deacon 2020-07-21  313   */
eb5c2d4b45e3d2d Will Deacon 2020-07-21  314  #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 @315  	_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2d Will Deacon 2020-07-21  316  

:::::: The code at line 315 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h

:::::: TO: Will Deacon <will at kernel.org>
:::::: CC: Will Deacon <will at kernel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



More information about the linux-arm-kernel mailing list