Re: [csky-linux:riscv_compat_v8 20/20] arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for function 'compat_setup_rt_frame'

From: Arnd Bergmann
Date: Wed Mar 16 2022 - 09:56:03 EST


On Wed, Mar 16, 2022 at 2:42 PM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> All warnings (new ones prefixed by >>):
>
> >> arch/riscv/kernel/compat_signal.c:199:5: warning: no previous prototype for function 'compat_setup_rt_frame' [-Wmissing-prototypes]
> int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
> ^
> arch/riscv/kernel/compat_signal.c:199:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> int compat_setup_rt_frame(struct ksignal *ksig, sigset_t *set,
> ^
> static
> 1 warning generated.

The problem here is that the compat_setup_rt_frame() declaration got added to
arch/riscv/kernel/signal.c instead of a header file that is included by both
signal.c and compat_signal.c.

Alternatively, the definition could be made static and moved into signal.c.

Arnd