On 5/21/23 02:12, kernel test robot wrote:
Hi Vegard,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git queue/5.4
head: 9b5924fbde0d84c8b30d7ee297a08ca441a760de
commit: 3910babeac1ab031f4e178042cbd1af9a9a0ec51 [4610/23441] compiler.h: fix error in BUILD_BUG_ON() reporting
config: sparc64-randconfig-c44-20230521
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=3910babeac1ab031f4e178042cbd1af9a9a0ec51
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc queue/5.4
git checkout 3910babeac1ab031f4e178042cbd1af9a9a0ec51
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/mt7615/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305210701.TND2uZBJ-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/skbuff.h:13,
from include/linux/if_ether.h:19,
from include/linux/etherdevice.h:20,
from drivers/net/wireless/mediatek/mt76/mt7615/mac.c:10:
drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function 'to_rssi':
include/linux/compiler.h:350:45: error: call to '__compiletime_assert_215' declared with attribute error: FIELD_GET: mask is not constant
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
I'm not sure why this flags my patch as the culprit.
I just tried this (with the supplied config):
git checkout stable/linux-5.4.y
git revert 3910babeac1ab031f4e178042cbd1af9a9a0ec51 # revert my patch
make drivers/net/wireless/mediatek/mt76/mt7615/mac.o
and it still outputs the same error.
The FIELD_GET() call was added in bf92e76851009 and seems to have been
broken from the start as far as I can tell? If I checkout bf92e76851009^
then it builds, if I checkout bf92e76851009 then it fails.
Should we just redefine to_rssi() as a macro so it actually passes the
field as a literal/constant?
Vegard