Re: [PATCH] csky: Fixup -Wmissing-prototypes warning

From: Guo Ren
Date: Fri Aug 11 2023 - 04:14:10 EST


On Fri, Aug 11, 2023 at 3:33 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> 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
I know you concern, but I didn't find a proper header file. So I
copied riscv solution, let's solve that in riscv first, then csky
would follow up. Thx.

> 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



--
Best Regards
Guo Ren