Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [thomas-weissschuh:b4/vdso-no-fallback 10/11] lib/vdso/gettimeofday.c:451:11: error: use of undeclared identifier 'EINVAL'
@ 2026-11-10 20:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-10 20:21 UTC (permalink / raw)
  To: Thomas Weißschuh ; +Cc: llvm, oe-kbuild-all

tree:   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/202611102127.IrGJFIGK-lkp@intel.com/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/202611102127.IrGJFIGK-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/202611102127.IrGJFIGK-lkp@intel.com/

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-10 20:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 20:21 [thomas-weissschuh:b4/vdso-no-fallback 10/11] lib/vdso/gettimeofday.c:451:11: error: use of undeclared identifier 'EINVAL' 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