Skip to content

Commit b7a7ce1

Browse files
arndbKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7877cb9 commit b7a7ce1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/time_namespace.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ struct time_namespace *copy_time_ns(unsigned long flags,
4444
struct time_namespace *old_ns);
4545
void free_time_ns(struct time_namespace *ns);
4646
void timens_on_fork(struct nsproxy *nsproxy, struct task_struct *tsk);
47-
struct vdso_data *arch_get_vdso_data(void *vvar_page);
4847
struct page *find_timens_vvar_page(struct vm_area_struct *vma);
4948

5049
static inline void put_time_ns(struct time_namespace *ns)
@@ -163,4 +162,6 @@ static inline ktime_t timens_ktime_to_host(clockid_t clockid, ktime_t tim)
163162
}
164163
#endif
165164

165+
struct vdso_data *arch_get_vdso_data(void *vvar_page);
166+
166167
#endif /* _LINUX_TIMENS_H */

0 commit comments

Comments
 (0)