Message ID | 20240330-sparc64-warnings-v1-10-37201023ee2f@ravnborg.org |
---|---|
State | New |
Headers | show |
Series | sparc64: Fix CPU online bug and warning fixes | expand |
On Sat, Mar 30, 2024, at 10:57, Sam Ravnborg via B4 Relay wrote: > From: Sam Ravnborg <sam@ravnborg.org> > > Fix the following warnings: > arch/sparc/vdso/vclock_gettime.c:254:1: error: no previous prototype > for ‘__vdso_clock_gettime’ > arch/sparc/vdso/vclock_gettime.c:282:1: error: no previous prototype > for ‘__vdso_clock_gettime_stick’ > arch/sparc/vdso/vclock_gettime.c:307:1: error: no previous prototype > for ‘__vdso_gettimeofday’ > arch/sparc/vdso/vclock_gettime.c:343:1: error: no previous prototype > for ‘__vdso_gettimeofday_stick’ > arch/sparc/vdso/vdso32/../vclock_gettime.c:254:1: error: no previous > prototype for ‘__vdso_clock_gettime’ > arch/sparc/vdso/vdso32/../vclock_gettime.c:282:1: error: no previous > prototype for ‘__vdso_clock_gettime_stick’ > arch/sparc/vdso/vdso32/../vclock_gettime.c:307:1: error: no previous > prototype for ‘__vdso_gettimeofday’ > arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: error: no previous > prototype for ‘__vdso_gettimeofday_stick’ > > The warnings were fixed by adding the proper prototypes to asm/vdso.h. > The better fix would be to convert sparc to be y2038 compliant so the > generic variant of vdso.h could be used. I would prefer leaving the warning here until it is fixed properly, or possibly removing the broken compat vdso support. The other patches look fine though. Arnd
diff --git a/arch/sparc/include/asm/vdso.h b/arch/sparc/include/asm/vdso.h index 59e79d35cd73..af630cad185c 100644 --- a/arch/sparc/include/asm/vdso.h +++ b/arch/sparc/include/asm/vdso.h @@ -5,6 +5,16 @@ #ifndef _ASM_SPARC_VDSO_H #define _ASM_SPARC_VDSO_H +#include <linux/linkage.h> +#include <linux/time.h> +#include <linux/time_types.h> +#include <linux/types.h> + +notrace int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts); +notrace int __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts); +notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz); +notrace int __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz); + struct vdso_image { void *data; unsigned long size; /* Always a multiple of PAGE_SIZE */ diff --git a/arch/sparc/vdso/vclock_gettime.c b/arch/sparc/vdso/vclock_gettime.c index e794edde6755..a3f85d9cea52 100644 --- a/arch/sparc/vdso/vclock_gettime.c +++ b/arch/sparc/vdso/vclock_gettime.c @@ -19,6 +19,7 @@ #include <asm/unistd.h> #include <asm/timex.h> #include <asm/clocksource.h> +#include <asm/vdso.h> #include <asm/vvar.h> #ifdef CONFIG_SPARC64