tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 274d7803837da78dfc911bcda0d593412676fc20 commit: 6b5ef194611e581b7da2bf0f7d3ad3950b2aaba3 [8700/11993] phy: mediatek: tphy: remove macros to prepare bitfield value config: xtensa-randconfig-s051-20220926 compiler: xtensa-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6b5ef194611e581b7da2bf0f7d3ad3950b2aaba3 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 6b5ef194611e581b7da2bf0f7d3ad3950b2aaba3 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=xtensa SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot Note: the linux-next/master HEAD 274d7803837da78dfc911bcda0d593412676fc20 builds fine. It may have been fixed somewhere. All errors (new ones prefixed by >>): In file included from : drivers/phy/mediatek/phy-mtk-io.h: In function 'mtk_phy_update_field': >> include/linux/compiler_types.h:354:45: error: call to '__compiletime_assert_252' declared with attribute error: FIELD_PREP: mask is not constant 354 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:335:25: note: in definition of macro '__compiletime_assert' 335 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:354:9: note: in expansion of macro '_compiletime_assert' 354 | _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:65:17: note: in expansion of macro 'BUILD_BUG_ON_MSG' 65 | BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask), \ | ^~~~~~~~~~~~~~~~ include/linux/bitfield.h:114:17: note: in expansion of macro '__BF_FIELD_CHECK' 114 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ | ^~~~~~~~~~~~~~~~ drivers/phy/mediatek/phy-mtk-io.h:42:40: note: in expansion of macro 'FIELD_PREP' 42 | mtk_phy_update_bits(reg, mask, FIELD_PREP(mask, val)); | ^~~~~~~~~~ vim +/__compiletime_assert_252 +354 include/linux/compiler_types.h eb5c2d4b45e3d2 Will Deacon 2020-07-21 340 eb5c2d4b45e3d2 Will Deacon 2020-07-21 341 #define _compiletime_assert(condition, msg, prefix, suffix) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 342 __compiletime_assert(condition, msg, prefix, suffix) eb5c2d4b45e3d2 Will Deacon 2020-07-21 343 eb5c2d4b45e3d2 Will Deacon 2020-07-21 344 /** eb5c2d4b45e3d2 Will Deacon 2020-07-21 345 * compiletime_assert - break build and emit msg if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 346 * @condition: a compile-time constant condition to check eb5c2d4b45e3d2 Will Deacon 2020-07-21 347 * @msg: a message to emit if condition is false eb5c2d4b45e3d2 Will Deacon 2020-07-21 348 * eb5c2d4b45e3d2 Will Deacon 2020-07-21 349 * In tradition of POSIX assert, this macro will break the build if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 350 * supplied condition is *false*, emitting the supplied error message if the eb5c2d4b45e3d2 Will Deacon 2020-07-21 351 * compiler has support to do so. eb5c2d4b45e3d2 Will Deacon 2020-07-21 352 */ eb5c2d4b45e3d2 Will Deacon 2020-07-21 353 #define compiletime_assert(condition, msg) \ eb5c2d4b45e3d2 Will Deacon 2020-07-21 @354 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) eb5c2d4b45e3d2 Will Deacon 2020-07-21 355 :::::: The code at line 354 was first introduced by commit :::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h :::::: TO: Will Deacon :::::: CC: Will Deacon -- 0-DAY CI Kernel Test Service https://01.org/lkp