From: kernel test robot <lkp@intel.com>
To: Vegard Nossum <vegard.nossum@oracle.com>
Cc: oe-kbuild-all@lists.linux.dev,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Daniel Santos <daniel.santos@pobox.com>,
Sasha Levin <sashal@kernel.org>
Subject: [linux-stable-rc:linux-5.4.y 4610/22976] include/linux/compiler.h:350:45: error: call to '__compiletime_assert_253' declared with attribute error: FIELD_GET: mask is not constant
Date: Tue, 4 Apr 2023 09:18:58 +0800 [thread overview]
Message-ID: <202304040908.quRhblEI-lkp@intel.com> (raw)
Hi Vegard,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: 73330daa339307fbff4ff7f1775da1dead794691
commit: 3910babeac1ab031f4e178042cbd1af9a9a0ec51 [4610/22976] compiler.h: fix error in BUILD_BUG_ON() reporting
config: i386-randconfig-r015-20230403 (https://download.01.org/0day-ci/archive/20230404/202304040908.quRhblEI-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# 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 linux-5.4.y
git checkout 3910babeac1ab031f4e178042cbd1af9a9a0ec51
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 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@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304040908.quRhblEI-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/export.h:42,
from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
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_253' declared with attribute error: FIELD_GET: mask is not constant
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler.h:331:25: note: in definition of macro '__compiletime_assert'
331 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler.h:350:9: note: in expansion of macro '_compiletime_assert'
350 | _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:95:17: note: in expansion of macro '__BF_FIELD_CHECK'
95 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:17: note: in expansion of macro 'FIELD_GET'
18 | return (FIELD_GET(field, rxv) - 220) / 2;
| ^~~~~~~~~
include/linux/compiler.h:350:45: error: call to '__compiletime_assert_257' declared with attribute error: BUILD_BUG_ON failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) & (((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler.h:331:25: note: in definition of macro '__compiletime_assert'
331 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler.h:350:9: note: in expansion of macro '_compiletime_assert'
350 | _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:95:17: note: in expansion of macro '__BF_FIELD_CHECK'
95 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:17: note: in expansion of macro 'FIELD_GET'
18 | return (FIELD_GET(field, rxv) - 220) / 2;
| ^~~~~~~~~
vim +/__compiletime_assert_253 +350 include/linux/compiler.h
336
337 #define _compiletime_assert(condition, msg, prefix, suffix) \
338 __compiletime_assert(condition, msg, prefix, suffix)
339
340 /**
341 * compiletime_assert - break build and emit msg if condition is false
342 * @condition: a compile-time constant condition to check
343 * @msg: a message to emit if condition is false
344 *
345 * In tradition of POSIX assert, this macro will break the build if the
346 * supplied condition is *false*, emitting the supplied error message if the
347 * compiler has support to do so.
348 */
349 #define compiletime_assert(condition, msg) \
> 350 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
351
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-04-04 1:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202304040908.quRhblEI-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.santos@pobox.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=vegard.nossum@oracle.com \
--cc=yamada.masahiro@socionext.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox