Skip to contentSkip to conversation

kernel/time/../../tools/testing/selftests/timers/auxclock.c:156:9: error: variable '_rval' is uninitialized when used here

PATCH kernel test robot 1 participant 1 message Jun 17, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/vdso-ptp
head:   2af36b301dbd31b23e13ee0d9d6cf65a475caba6
commit: 2af36b301dbd31b23e13ee0d9d6cf65a475caba6 [41/41] selftests/timers/auxclock: Test vDSO functionality
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20250618/[email protected]/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250618/[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 kernel/time/test_auxclock.c:1:

>> kernel/time/../../tools/testing/selftests/timers/auxclock.c:156:9: error: variable '_rval' is uninitialized when used here [-Werror,-Wuninitialized]
     156 |                 ret = VDSO_CALL(self->vdso_clock_gettime, 2, clockid, &_ts);
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/time/../../tools/testing/selftests/timers/../vDSO/vdso_call.h:59:10: note: expanded from macro 'VDSO_CALL'
      59 |                 : "r" (_rval)                                           \
         |                        ^~~~~
   kernel/time/../../tools/testing/selftests/timers/auxclock.c:156:9: note: variable '_rval' is declared here
   kernel/time/../../tools/testing/selftests/timers/../vDSO/vdso_call.h:47:2: note: expanded from macro 'VDSO_CALL'
      47 |         register long _rval asm ("r3");                                 \
         |         ^
   In file included from kernel/time/test_auxclock.c:1:
   kernel/time/../../tools/testing/selftests/timers/auxclock.c:154:10: error: variable '_rval' is uninitialized when used here [-Werror,-Wuninitialized]
     154 |                 return VDSO_CALL(self->vdso_clock_gettime64, 2, clockid, ts);
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/time/../../tools/testing/selftests/timers/../vDSO/vdso_call.h:59:10: note: expanded from macro 'VDSO_CALL'
      59 |                 : "r" (_rval)                                           \
         |                        ^~~~~
   kernel/time/../../tools/testing/selftests/timers/auxclock.c:154:10: note: variable '_rval' is declared here
   kernel/time/../../tools/testing/selftests/timers/../vDSO/vdso_call.h:47:2: note: expanded from macro 'VDSO_CALL'
      47 |         register long _rval asm ("r3");                                 \
         |         ^
   In file included from kernel/time/test_auxclock.c:1:
   kernel/time/../../tools/testing/selftests/timers/auxclock.c:172:9: error: variable '_rval' is uninitialized when used here [-Werror,-Wuninitialized]
     172 |                 ret = VDSO_CALL(self->vdso_clock_getres, 2, clockid, &_ts);
         |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/time/../../tools/testing/selftests/timers/../vDSO/vdso_call.h:59:10: note: expanded from macro 'VDSO_CALL'
      59 |                 : "r" (_rval)                                           \
         |                        ^~~~~
   kernel/time/../../tools/testing/selftests/timers/auxclock.c:172:9: note: variable '_rval' is declared here
   kernel/time/../../tools/testing/selftests/timers/../vDSO/vdso_call.h:47:2: note: expanded from macro 'VDSO_CALL'
      47 |         register long _rval asm ("r3");                                 \
         |         ^

3 errors generated.

vim +/_rval +156 kernel/time/../../tools/testing/selftests/timers/auxclock.c

146
147 static int vdso_clock_gettime64(FIXTURE_DATA(auxclock) *self, __kernel_clockid_t clockid,
148 struct __kernel_timespec *ts)
149 {
150 struct timespec _ts;
151 int ret;
152
153 if (self->vdso_clock_gettime64) {
154 return VDSO_CALL(self->vdso_clock_gettime64, 2, clockid, ts);
155 } else if (self->vdso_clock_gettime) {

 > 156			ret = VDSO_CALL(self->vdso_clock_gettime, 2, clockid, &_ts);

157 if (!ret)
158 timespec_to_kernel_timespec(&_ts, ts);
159 return ret;
160 } else {
161 return -ENOSYS;
162 }
163 }
164

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki