riscv: traps: Fix no prototype warnings
authorNanyong Sun <sunnanyong@huawei.com>
Fri, 5 Mar 2021 11:33:24 +0000 (19:33 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 10 Mar 2021 04:45:51 +0000 (20:45 -0800)
commit030f1dfa855054db5d845eca7f04c8cfda1c9f51
tree60e414f7498acd75540e4c2582e2f53aef29a2ff
parent6dd4879f59b0a0679ed8c3ebaff3d79f37930778
riscv: traps: Fix no prototype warnings

Fix all W=1 compilation warnings:'no previous prototype for' in arch/riscv/kernel/traps.c:
arch/riscv/kernel/traps.c:96:15: warning: no previous prototype for ‘do_trap_unknown’ [-Wmissing-prototypes]
   96 | DO_ERROR_INFO(do_trap_unknown,
      |               ^~~~~~~~~~~~~~~
arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’
   91 | asmlinkage __visible void name(struct pt_regs *regs)   \
      |                           ^~~~
arch/riscv/kernel/traps.c:98:15: warning: no previous prototype for ‘do_trap_insn_misaligned’ [-Wmissing-prototypes]
   98 | DO_ERROR_INFO(do_trap_insn_misaligned,
      |               ^~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’
   91 | asmlinkage __visible void name(struct pt_regs *regs)   \
      |                           ^~~~
arch/riscv/kernel/traps.c:100:15: warning: no previous prototype for ‘do_trap_insn_fault’ [-Wmissing-prototypes]
...

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
[Palmer: fix checkpatch warnings]
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/asm-prototypes.h
arch/riscv/kernel/traps.c