[openeuler:openEuler-1.0-LTS 1941/1941] arch/arm64/kernel/vdso/gettimeofday.c:268:13: warning: no previous prototype for '__kernel_clock_gettime'
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: df8d11fbcbb07177c2500e63d7f5a36063977596 commit: f43f336031282e8ea7e5f7f887c5a6ff7b9c99b0 [1941/1941] arm64:vdso: Rewrite gettimeofday into C. config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20251212/202512121347.W2YjDC5J-lkp@i...) compiler: aarch64-linux-gcc (GCC) 15.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251212/202512121347.W2YjDC5J-lkp@i...) 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/202512121347.W2YjDC5J-lkp@intel.com/ Note: functions only called from assembly code should be annotated with the asmlinkage attribute All warnings (new ones prefixed by >>):
arch/arm64/kernel/vdso/gettimeofday.c:268:13: warning: no previous prototype for '__kernel_clock_gettime' [-Wmissing-prototypes] 268 | notrace int __kernel_clock_gettime(clockid_t clock, struct timespec *ts) | ^~~~~~~~~~~~~~~~~~~~~~ arch/arm64/kernel/vdso/gettimeofday.c:302:13: warning: no previous prototype for '__kernel_gettimeofday' [-Wmissing-prototypes] 302 | notrace int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz) | ^~~~~~~~~~~~~~~~~~~~~ arch/arm64/kernel/vdso/gettimeofday.c:325:5: warning: no previous prototype for '__kernel_clock_getres' [-Wmissing-prototypes] 325 | int __kernel_clock_getres(clockid_t clock_id, struct timespec *res) | ^~~~~~~~~~~~~~~~~~~~~
vim +/__kernel_clock_gettime +268 arch/arm64/kernel/vdso/gettimeofday.c 267
268 notrace int __kernel_clock_gettime(clockid_t clock, struct timespec *ts) 269 { 270 const struct vdso_data *vd = &_vdso_data; 271 272 switch (clock) { 273 case CLOCK_REALTIME: 274 if (do_realtime(vd, ts)) 275 goto fallback; 276 break; 277 case CLOCK_MONOTONIC: 278 if (do_monotonic(vd, ts)) 279 goto fallback; 280 break; 281 case CLOCK_MONOTONIC_RAW: 282 if (do_monotonic_raw(vd, ts)) 283 goto fallback; 284 break; 285 case CLOCK_REALTIME_COARSE: 286 do_realtime_coarse(vd, ts); 287 break; 288 case CLOCK_MONOTONIC_COARSE: 289 do_monotonic_coarse(vd, ts); 290 break; 291 default: 292 goto fallback; 293 } 294 295 return 0; 296 fallback: 297 return clock_gettime_fallback(clock, ts); 298 } 299 300 301 302 notrace int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz) 303 { 304 const struct vdso_data *vd = &_vdso_data; 305 306 if (likely(tv != NULL)) { 307 struct timespec ts; 308 309 if (do_realtime(vd, &ts)) 310 return gettimeofday_fallback(tv, tz); 311 312 tv->tv_sec = ts.tv_sec; 313 tv->tv_usec = ts.tv_nsec / 1000; 314 } 315 316 if (unlikely(tz != NULL)) { 317 tz->tz_minuteswest = vd->tz_minuteswest; 318 tz->tz_dsttime = vd->tz_dsttime; 319 } 320 321 return 0; 322 } 323 324 325 int __kernel_clock_getres(clockid_t clock_id, struct timespec *res)
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot