lib/vdso/gettimeofday.c:451:11: error: use of undeclared identifier 'EINVAL'
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/vdso-no-fallback head: 3b966bf4e9676dd99abe071691e72e14fd05fe73 commit: 090f60ded7da81c15e516570a3d5b89de9d00587 [10/11] getres: fallback config: powerpc-randconfig-2001-20261110 (https://download.01.org/0day-ci/archive/20261110/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 053b4a894ceaebc2eed76a7fa09f58cf7e313a69) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261110/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from <built-in>:4:
>> lib/vdso/gettimeofday.c:451:11: error: use of undeclared identifier 'EINVAL'
451 | return -EINVAL;
| ^~~~~~
lib/vdso/gettimeofday.c:476:11: error: use of undeclared identifier 'EINVAL'
476 | return -EINVAL;
| ^~~~~~ 2 errors generated.
make[3]: *** [arch/powerpc/kernel/vdso/Makefile:96: arch/powerpc/kernel/vdso/vgettimeofday-32.o] Error 1 shuffle=3186034347 make[3]: Target 'include/generated/vdso32-offsets.h' not remade because of errors.
make[2]: *** [arch/powerpc/Makefile:395: vdso_prepare] Error 2 shuffle=3186034347
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2 shuffle=3186034347
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2 shuffle=3186034347
make: Target 'prepare' not remade because of errors.
vim +/EINVAL +451 lib/vdso/gettimeofday.c
442
443 static __always_inline
444 int __cvdso_clock_getres_common(const struct vdso_time_data *vd, clockid_t clock,
445 struct __kernel_timespec *res)
446 {
447 u32 msk;
448 u64 ns;
449
450 if (!vdso_clockid_valid(clock))
> 451 return -EINVAL;
452
453 if (vdso_is_timens_clock(&vd->hres_coarse))
454 vd = vdso_timens_data(vd);
455
456 /*
457 * Convert the clockid to a bitmask and use it to check which
458 * clocks are handled in the VDSO directly.
459 */
460 msk = 1U << clock;
461 if (msk & (VDSO_HRES | VDSO_RAW)) {
462 /*
463 * Preserves the behaviour of posix_get_hrtimer_res().
464 */
465 ns = READ_ONCE(vd->hrtimer_res);
466 } else if (msk & VDSO_COARSE) {
467 /*
468 * Preserves the behaviour of posix_get_coarse_res().
469 */
470 ns = LOW_RES_NSEC;
471 } else if (msk & VDSO_AUX) {
472 ns = aux_clock_resolution_ns();
473 } else if (msk & vdso_alarmclock_mask(vd)) {
474 ns = READ_ONCE(vd->hrtimer_res);
475 } else {
476 return -EINVAL;
477 }
478
479 if (likely(res)) {
480 res->tv_sec = 0;
481 res->tv_nsec = ns;
482 }
483 return 0;
484 }
485
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki