From: kernel test robot <lkp@intel.com>
To: Conall O'Griofa <conall.ogriofa@amd.com>
Cc: oe-kbuild-all@lists.linux.dev, git@amd.com,
Michal Simek <monstr@monstr.eu>,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Subject: [xilinx-xlnx:xlnx_rebase_v6.6 137/860] include/linux/compiler_types.h:425:45: error: call to '__compiletime_assert_238' declared with attribute error: FIELD_GET: mask is zero
Date: Fri, 1 Mar 2024 17:58:39 +0800 [thread overview]
Message-ID: <202403011726.dG8VehHd-lkp@intel.com> (raw)
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v6.6
head: 24eec56fe5bd68cae795c37c61276b4dcf218a53
commit: 9d29858b73b0579e8cff27add03a8b24ecead5f1 [137/860] drivers: iio: adc: xilinx-ams: Add over temperature interrupts
config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20240301/202403011726.dG8VehHd-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240301/202403011726.dG8VehHd-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/202403011726.dG8VehHd-lkp@intel.com/
All errors (new ones prefixed by >>):
21 | BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
| ^~~~~~~~~~~~
include/linux/bitfield.h:74:17: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
74 | __BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:75:56: note: in expansion of macro '__bf_shf'
75 | (1ULL << __bf_shf(_mask))); \
| ^~~~~~~~
include/linux/bitfield.h:154:17: note: in expansion of macro '__BF_FIELD_CHECK'
154 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:401:15: note: in expansion of macro 'FIELD_GET'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:141:41: note: in expansion of macro 'BIT'
141 | #define AMS_ISR1_ALARM_2_MASK BIT(34)
| ^~~
drivers/iio/adc/xilinx-ams.c:401:25: note: in expansion of macro 'AMS_ISR1_ALARM_2_MASK'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:75:53: warning: left shift count is negative [-Wshift-count-negative]
75 | (1ULL << __bf_shf(_mask))); \
| ^~
include/linux/compiler_types.h:405:23: note: in definition of macro '__compiletime_assert'
405 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:425:9: note: in expansion of macro '_compiletime_assert'
425 | _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:74:17: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
74 | __BUILD_BUG_ON_NOT_POWER_OF_2((_mask) + \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:154:17: note: in expansion of macro '__BF_FIELD_CHECK'
154 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:401:15: note: in expansion of macro 'FIELD_GET'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~
include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
include/linux/bitfield.h:155:44: note: in definition of macro 'FIELD_GET'
155 | (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
| ^~~~~
drivers/iio/adc/xilinx-ams.c:141:41: note: in expansion of macro 'BIT'
141 | #define AMS_ISR1_ALARM_2_MASK BIT(34)
| ^~~
drivers/iio/adc/xilinx-ams.c:401:25: note: in expansion of macro 'AMS_ISR1_ALARM_2_MASK'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~~~~~~~~~~~~~
include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
include/linux/bitfield.h:45:38: note: in definition of macro '__bf_shf'
45 | #define __bf_shf(x) (__builtin_ffsll(x) - 1)
| ^
drivers/iio/adc/xilinx-ams.c:401:15: note: in expansion of macro 'FIELD_GET'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c:141:41: note: in expansion of macro 'BIT'
141 | #define AMS_ISR1_ALARM_2_MASK BIT(34)
| ^~~
drivers/iio/adc/xilinx-ams.c:401:25: note: in expansion of macro 'AMS_ISR1_ALARM_2_MASK'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:155:52: warning: right shift count is negative [-Wshift-count-negative]
155 | (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
| ^~
drivers/iio/adc/xilinx-ams.c:401:15: note: in expansion of macro 'FIELD_GET'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~
drivers/iio/adc/xilinx-ams.c: In function 'ams_update_alarm':
drivers/iio/adc/xilinx-ams.c:424:51: warning: left shift count >= width of type [-Wshift-count-overflow]
424 | (AMS_ISR1_ALARM_MASK << AMS_ISR1_ALARM_SHIFT)),
| ^~
In file included from include/linux/bits.h:6,
from drivers/iio/adc/xilinx-ams.c:11:
drivers/iio/adc/xilinx-ams.c: In function 'ams_get_alarm_mask':
include/vdso/bits.h:7:40: warning: left shift count >= width of type [-Wshift-count-overflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^~
drivers/iio/adc/xilinx-ams.c:929:24: note: in expansion of macro 'BIT'
929 | return BIT(AMS_ALARM_BIT_TEMP_OT_REMOTE);
| ^~~
drivers/iio/adc/xilinx-ams.c: In function 'ams_irq':
drivers/iio/adc/xilinx-ams.c:1137:42: warning: left shift count >= width of type [-Wshift-count-overflow]
1137 | (AMS_ISR1_ALARM_MASK << AMS_ISR1_ALARM_SHIFT)) |
| ^~
In function 'ams_update_ps_alarm',
inlined from 'ams_update_alarm' at drivers/iio/adc/xilinx-ams.c:416:3,
inlined from 'ams_write_event_config' at drivers/iio/adc/xilinx-ams.c:963:2:
>> include/linux/compiler_types.h:425:45: error: call to '__compiletime_assert_238' declared with attribute error: FIELD_GET: mask is zero
425 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:406:25: note: in definition of macro '__compiletime_assert'
406 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:425:9: note: in expansion of macro '_compiletime_assert'
425 | _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:154:17: note: in expansion of macro '__BF_FIELD_CHECK'
154 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:377:15: note: in expansion of macro 'FIELD_GET'
377 | val = FIELD_GET(AMS_ISR1_ALARM_1_TO_0_MASK, alarm_mask);
| ^~~~~~~~~
In function 'ams_update_pl_alarm',
inlined from 'ams_update_alarm' at drivers/iio/adc/xilinx-ams.c:419:3,
inlined from 'ams_write_event_config' at drivers/iio/adc/xilinx-ams.c:963:2:
include/linux/compiler_types.h:425:45: error: call to '__compiletime_assert_283' declared with attribute error: FIELD_GET: mask is zero
425 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:406:25: note: in definition of macro '__compiletime_assert'
406 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:425:9: note: in expansion of macro '_compiletime_assert'
425 | _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:154:17: note: in expansion of macro '__BF_FIELD_CHECK'
154 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/iio/adc/xilinx-ams.c:401:15: note: in expansion of macro 'FIELD_GET'
401 | val = FIELD_GET(AMS_ISR1_ALARM_2_MASK, alarm_mask);
| ^~~~~~~~~
vim +/__compiletime_assert_238 +425 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 411
eb5c2d4b45e3d2 Will Deacon 2020-07-21 412 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 413 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 414
eb5c2d4b45e3d2 Will Deacon 2020-07-21 415 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 416 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 417 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 418 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 419 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 420 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 421 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 422 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 423 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 424 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @425 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 426
:::::: The code at line 425 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:[~2024-03-01 9:59 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=202403011726.dG8VehHd-lkp@intel.com \
--to=lkp@intel.com \
--cc=conall.ogriofa@amd.com \
--cc=git@amd.com \
--cc=monstr@monstr.eu \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=radhey.shyam.pandey@amd.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 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.