* [tip:timers/ptp 39/39] lib/vdso/gettimeofday.c:335:17: warning: shift count >= width of type
@ 2025-07-07 19:12 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-07-07 19:12 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: llvm, oe-kbuild-all, linux-kernel, x86, Thomas Gleixner
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/ptp
head: 7893ea1006fcbb876ddf53ad4ebba4a054add4b2
commit: 7893ea1006fcbb876ddf53ad4ebba4a054add4b2 [39/39] vdso/gettimeofday: Add support for auxiliary clocks
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20250708/202507080348.hKtUspGk-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 01c97b4953e87ae455bd4c41e3de3f0f0f29c61c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250708/202507080348.hKtUspGk-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/202507080348.hKtUspGk-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from <built-in>:4:
>> lib/vdso/gettimeofday.c:335:17: warning: shift count >= width of type [-Wshift-count-overflow]
335 | else if (msk & VDSO_AUX)
| ^~~~~~~~
include/vdso/datapage.h:50:18: note: expanded from macro 'VDSO_AUX'
50 | #define VDSO_AUX __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/bits.h:7:56: note: expanded from macro '__GENMASK'
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <built-in>:4:
lib/vdso/gettimeofday.c:481:19: warning: shift count >= width of type [-Wshift-count-overflow]
481 | } else if (msk & VDSO_AUX) {
| ^~~~~~~~
include/vdso/datapage.h:50:18: note: expanded from macro 'VDSO_AUX'
50 | #define VDSO_AUX __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/bits.h:7:56: note: expanded from macro '__GENMASK'
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
--
In file included from <built-in>:4:
>> lib/vdso/gettimeofday.c:335:17: warning: shift count >= width of type [-Wshift-count-overflow]
335 | else if (msk & VDSO_AUX)
| ^~~~~~~~
include/vdso/datapage.h:50:18: note: expanded from macro 'VDSO_AUX'
50 | #define VDSO_AUX __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/bits.h:7:56: note: expanded from macro '__GENMASK'
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <built-in>:4:
lib/vdso/gettimeofday.c:481:19: warning: shift count >= width of type [-Wshift-count-overflow]
481 | } else if (msk & VDSO_AUX) {
| ^~~~~~~~
include/vdso/datapage.h:50:18: note: expanded from macro 'VDSO_AUX'
50 | #define VDSO_AUX __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/linux/bits.h:7:56: note: expanded from macro '__GENMASK'
7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +335 lib/vdso/gettimeofday.c
313
314 static __always_inline bool
315 __cvdso_clock_gettime_common(const struct vdso_time_data *vd, clockid_t clock,
316 struct __kernel_timespec *ts)
317 {
318 const struct vdso_clock *vc = vd->clock_data;
319 u32 msk;
320
321 if (!vdso_clockid_valid(clock))
322 return false;
323
324 /*
325 * Convert the clockid to a bitmask and use it to check which
326 * clocks are handled in the VDSO directly.
327 */
328 msk = 1U << clock;
329 if (likely(msk & VDSO_HRES))
330 vc = &vc[CS_HRES_COARSE];
331 else if (msk & VDSO_COARSE)
332 return do_coarse(vd, &vc[CS_HRES_COARSE], clock, ts);
333 else if (msk & VDSO_RAW)
334 vc = &vc[CS_RAW];
> 335 else if (msk & VDSO_AUX)
336 return do_aux(vd, clock, ts);
337 else
338 return false;
339
340 return do_hres(vd, vc, clock, ts);
341 }
342
--
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:[~2025-07-07 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-07 19:12 [tip:timers/ptp 39/39] lib/vdso/gettimeofday.c:335:17: warning: shift count >= width of type kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®