[PATCH] arm64: vdso: Add extern declarations for vDSO time-related functions

Will Deacon will at kernel.org
Tue Sep 15 07:48:02 EDT 2020


On Tue, Sep 15, 2020 at 07:24:30PM +0800, Tian Tao wrote:
> Add extern declarations for vDSO time-related functions to notify the
> compiler these functions will be used in somewhere to fix
> "no previous prototype" compile warning.
> 
> arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: no previous
> prototype for ‘__kernel_clock_gettime’ [-Wmissing-prototypes]
> int __kernel_clock_gettime(clockid_t clock,
>      ^
> arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: no previous
> prototype for ‘__kernel_gettimeofday’ [-Wmissing-prototypes]
> int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
>      ^
> arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: no previous
> prototype for ‘__kernel_clock_getres’ [-Wmissing-prototypes]
> int __kernel_clock_getres(clockid_t clock_id,

I think this warning is silly and we should ignore it. The function is
only called from userspace, so why should we add a declaration in the
kernel?

Will



More information about the linux-arm-kernel mailing list