Re: [PATCH] csky: Fixup -Wmissing-prototypes warning
From: Arnd Bergmann
Date: Fri Aug 11 2023 - 03:33:29 EST
On Fri, Aug 11, 2023, at 05:07, guoren@xxxxxxxxxx wrote:
>
> Link: https://lore.kernel.org/lkml/20230810141947.1236730-17-arnd@xxxxxxxxxx/
> Reported-by: Arnd Bergmann <arnd@xxxxxxxxxx>
> Signed-off-by: Guo Ren <guoren@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Guo Ren <guoren@xxxxxxxxxx>
Thanks for addressing these!
Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
> --- a/arch/csky/kernel/vdso/vgettimeofday.c
> +++ b/arch/csky/kernel/vdso/vgettimeofday.c
> @@ -3,24 +3,35 @@
> #include <linux/time.h>
> #include <linux/types.h>
>
> +extern
> +int __vdso_clock_gettime(clockid_t clock,
> + struct old_timespec32 *ts);
> int __vdso_clock_gettime(clockid_t clock,
> struct old_timespec32 *ts)
> {
> return __cvdso_clock_gettime32(clock, ts);
> }
>
This works, but it would be a bit nicer to move the
declarations into a header. I see that we already handle
this in three different ways across x86, arm and arm64,
and you picked method from x86 (and loongarch) here, so
I can't really complain.
What we should probably have instead is a new header
in include/vdso/ that declares the functions for
every architecture.
Arnd