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

tiantao (H) tiantao6 at huawei.com
Tue Sep 15 08:06:28 EDT 2020


riscv has fixed the warning by adding a declaration in the
kernel.
I agree with you.We should ignore this warning.

在 2020/9/15 19:48, Will Deacon 写道:
> 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