* [abelloni:rtc-next 7/14] drivers/rtc/rtc-renesas-rtca3.c:233:9: warning: result of comparison of constant 65535 with expression of type 'typeof (_Generic((mask), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned shor...
@ 2026-06-22 17:52 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-22 17:52 UTC (permalink / raw)
To: Alexandre Belloni; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
head: 041ca8884410a4f70b40521f34258c7b773ea5c2
commit: 2098bb8ac5f5a66b1a0e02512ae11b6208936c92 [7/14] rtc: renesas-rtca3: Factor out year decoding helper
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260623/202606230130.jmcAMnJP-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project a9b492db3d50683e446cd1a5c9ffaf4e92cb77a7)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260623/202606230130.jmcAMnJP-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/202606230130.jmcAMnJP-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/rtc/rtc-renesas-rtca3.c:233:9: warning: result of comparison of constant 65535 with expression of type 'typeof (_Generic((mask), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned short)0, short: (unsigned short)0, unsigned int: (unsigned int)0, int: (unsigned int)0, unsigned long: (unsigned long)0, long: (unsigned long)0, unsigned long long: (unsigned long long)0, long long: (unsigned long long)0, default: (mask)))' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
233 | u8 y = FIELD_GET(mask, year);
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:177:3: note: expanded from macro 'FIELD_GET'
177 | __BF_FIELD_CHECK_REG(_mask, _reg, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:79:50: note: expanded from macro '__BF_FIELD_CHECK_REG'
79 | BUILD_BUG_ON_MSG(__bf_cast_unsigned(mask, mask) > \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
80 | __bf_cast_unsigned(reg, ~0ull), \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81 | pfx "type of reg too small for mask")
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:40:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
include/linux/compiler_types.h:699:22: note: expanded from macro 'compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:687:23: note: expanded from macro '_compiletime_assert'
687 | __compiletime_assert(condition, msg, prefix, suffix)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:679:9: note: expanded from macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
1 warning generated.
vim +233 drivers/rtc/rtc-renesas-rtca3.c
230
231 static u32 rtca3_decode_year(u8 mask, u16 year)
232 {
> 233 u8 y = FIELD_GET(mask, year);
234 u32 century = bcd2bin((y == 0x99) ? 0x19 : 0x20);
235
236 return (century * 100 + bcd2bin(y)) - 1900;
237 }
238
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-22 17:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 17:52 [abelloni:rtc-next 7/14] drivers/rtc/rtc-renesas-rtca3.c:233:9: warning: result of comparison of constant 65535 with expression of type 'typeof (_Generic((mask), char: (unsigned char)0, unsigned char: (unsigned char)0, signed char: (unsigned char)0, unsigned short: (unsigned shor kernel test robot
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.