From: kernel test robot <lkp@intel.com>
To: Sven Peter <sven@svenpeter.dev>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [asahilinux:sven/smc-v4 4/9] include/linux/compiler_types.h:557:45: error: call to '__compiletime_assert_422' declared with attribute error: FIELD_PREP: mask is zero
Date: Thu, 17 Apr 2025 01:57:05 +0800 [thread overview]
Message-ID: <202504170158.D161YYBP-lkp@intel.com> (raw)
tree: https://github.com/AsahiLinux/linux sven/smc-v4
head: 682159b095a70eca3ef9bdd5bb513aae5aa992b6
commit: fff9f4467d52393012e4d98dd77d390299a98173 [4/9] WIP: mfd: Add Apple Silicon SMC driver
config: i386-buildonly-randconfig-003-20250417 (https://download.01.org/0day-ci/archive/20250417/202504170158.D161YYBP-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250417/202504170158.D161YYBP-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504170158.D161YYBP-lkp@intel.com/
All errors (new ones prefixed by >>):
include/linux/compiler_types.h:557:9: note: in expansion of macro '_compiletime_assert'
557 | _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:75:17: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
75 | __BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:76:56: note: in expansion of macro '__bf_shf'
76 | (1ULL << __bf_shf(_mask))); \
| ^~~~~~~~
include/linux/bitfield.h:155:17: note: in expansion of macro '__BF_FIELD_CHECK'
155 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/mfd/macsmc.c:484:17: note: in expansion of macro 'FIELD_GET'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~~
include/linux/bits.h:34:38: note: in expansion of macro '__GENMASK'
34 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/mfd/macsmc.c:37:41: note: in expansion of macro 'GENMASK'
37 | #define SMC_DATA GENMASK(63, 32)
| ^~~~~~~
drivers/mfd/macsmc.c:484:27: note: in expansion of macro 'SMC_DATA'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~
include/uapi/linux/bits.h:7:37: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bitfield.h:156:44: note: in definition of macro 'FIELD_GET'
156 | (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
| ^~~~~
include/linux/bits.h:34:38: note: in expansion of macro '__GENMASK'
34 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/mfd/macsmc.c:37:41: note: in expansion of macro 'GENMASK'
37 | #define SMC_DATA GENMASK(63, 32)
| ^~~~~~~
drivers/mfd/macsmc.c:484:27: note: in expansion of macro 'SMC_DATA'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~
include/uapi/linux/bits.h:7:56: warning: right shift count is negative [-Wshift-count-negative]
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bitfield.h:156:44: note: in definition of macro 'FIELD_GET'
156 | (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
| ^~~~~
include/linux/bits.h:34:38: note: in expansion of macro '__GENMASK'
34 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/mfd/macsmc.c:37:41: note: in expansion of macro 'GENMASK'
37 | #define SMC_DATA GENMASK(63, 32)
| ^~~~~~~
drivers/mfd/macsmc.c:484:27: note: in expansion of macro 'SMC_DATA'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~
include/uapi/linux/bits.h:7:37: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bitfield.h:45:38: note: in definition of macro '__bf_shf'
45 | #define __bf_shf(x) (__builtin_ffsll(x) - 1)
| ^
drivers/mfd/macsmc.c:484:17: note: in expansion of macro 'FIELD_GET'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~~
include/linux/bits.h:34:38: note: in expansion of macro '__GENMASK'
34 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/mfd/macsmc.c:37:41: note: in expansion of macro 'GENMASK'
37 | #define SMC_DATA GENMASK(63, 32)
| ^~~~~~~
drivers/mfd/macsmc.c:484:27: note: in expansion of macro 'SMC_DATA'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~
include/uapi/linux/bits.h:7:56: warning: right shift count is negative [-Wshift-count-negative]
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^~
include/linux/bitfield.h:45:38: note: in definition of macro '__bf_shf'
45 | #define __bf_shf(x) (__builtin_ffsll(x) - 1)
| ^
drivers/mfd/macsmc.c:484:17: note: in expansion of macro 'FIELD_GET'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~~
include/linux/bits.h:34:38: note: in expansion of macro '__GENMASK'
34 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~
drivers/mfd/macsmc.c:37:41: note: in expansion of macro 'GENMASK'
37 | #define SMC_DATA GENMASK(63, 32)
| ^~~~~~~
drivers/mfd/macsmc.c:484:27: note: in expansion of macro 'SMC_DATA'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~
drivers/mfd/macsmc.c: In function 'apple_smc_write_atomic':
>> include/linux/compiler_types.h:557:45: error: call to '__compiletime_assert_422' declared with attribute error: FIELD_PREP: mask is zero
557 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:538:25: note: in definition of macro '__compiletime_assert'
538 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:557:9: note: in expansion of macro '_compiletime_assert'
557 | _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:67:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
67 | BUILD_BUG_ON_MSG((_mask) == 0, _pfx "mask is zero"); \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:115:17: note: in expansion of macro '__BF_FIELD_CHECK'
115 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
| ^~~~~~~~~~~~~~~~
drivers/mfd/macsmc.c:361:16: note: in expansion of macro 'FIELD_PREP'
361 | FIELD_PREP(SMC_DATA, key));
| ^~~~~~~~~~
drivers/mfd/macsmc.c: In function 'apple_smc_rtkit_recv':
>> include/linux/compiler_types.h:557:45: error: call to '__compiletime_assert_458' declared with attribute error: FIELD_GET: mask is zero
557 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:538:25: note: in definition of macro '__compiletime_assert'
538 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:557:9: note: in expansion of macro '_compiletime_assert'
557 | _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:67:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
67 | BUILD_BUG_ON_MSG((_mask) == 0, _pfx "mask is zero"); \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:155:17: note: in expansion of macro '__BF_FIELD_CHECK'
155 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/mfd/macsmc.c:484:17: note: in expansion of macro 'FIELD_GET'
484 | event = FIELD_GET(SMC_DATA, message);
| ^~~~~~~~~
drivers/mfd/macsmc.c: In function 'apple_smc_cmd_locked.constprop':
include/linux/compiler_types.h:557:45: error: call to '__compiletime_assert_362' declared with attribute error: FIELD_PREP: mask is zero
557 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:538:25: note: in definition of macro '__compiletime_assert'
538 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:557:9: note: in expansion of macro '_compiletime_assert'
557 | _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:67:17: note: in expansion of macro 'BUILD_BUG_ON_MSG'
67 | BUILD_BUG_ON_MSG((_mask) == 0, _pfx "mask is zero"); \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:115:17: note: in expansion of macro '__BF_FIELD_CHECK'
115 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
| ^~~~~~~~~~~~~~~~
drivers/mfd/macsmc.c:71:16: note: in expansion of macro 'FIELD_PREP'
71 | FIELD_PREP(SMC_DATA, arg));
| ^~~~~~~~~~
vim +/__compiletime_assert_422 +557 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 543
eb5c2d4b45e3d2 Will Deacon 2020-07-21 544 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 545 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 546
eb5c2d4b45e3d2 Will Deacon 2020-07-21 547 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 548 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 549 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 550 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 551 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 552 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 553 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 554 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 555 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 556 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @557 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 558
:::::: The code at line 557 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will@kernel.org>
:::::: CC: Will Deacon <will@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-16 17:57 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=202504170158.D161YYBP-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sven@svenpeter.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.