vdso/timens: Always provide arch_get_vdso_data() prototype for vdso
authorArnd Bergmann <arnd@arndb.de>
Wed, 17 May 2023 13:11:02 +0000 (15:11 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 31 May 2023 19:45:49 +0000 (21:45 +0200)
commitb7a7ce1bb77b19ff2859d365da96285340fbc145
treed9a2981cdbe59075dc7b45e4ec564bef341c69b9
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4
vdso/timens: Always provide arch_get_vdso_data() prototype for vdso

The arch_get_vdso_data() function is defined separately on each architecture,
but only called when CONFIG_TIME_NS is set. If the definition is a global
function, this causes a W=1 warning without TIME_NS:

arch/x86/entry/vdso/vma.c:35:19: error: no previous prototype for 'arch_get_vdso_data' [-Werror=missing-prototypes]

Move the prototype out of the #ifdef block to reliably turn off that
warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230517131102.934196-15-arnd@kernel.org
include/linux/time_namespace.h