Re: [PATCH] arm64: asm: vdso: gettimeofday: export common variables

From: Will Deacon
Date: Mon Oct 11 2021 - 06:03:04 EST


On Thu, Oct 07, 2021 at 09:57:54PM +0200, Anders Roxell wrote:
> When building the kernel with sparse enabled 'C=1' the following
> warnings can be seen:
>
> arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: symbol '__kernel_clock_gettime' was not declared. Should it be static?
> arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: symbol '__kernel_gettimeofday' was not declared. Should it be static?
> arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: symbol '__kernel_clock_getres' was not declared. Should it be static?
>
> Rework so the variables are exported, since these variables are
> created and used in vdso/vgettimeofday.c, also used in vdso.lds.S.

Hmm, these functions are part of the vDSO and shouldn't be called from the
kernel, so I don't think it makes sense to add prototypes for them to a
kernel header, to be honest.

Will