Declare externally used functions in reset.c to resolve compilation
warnings.
Fix follow errors with gcc-14 when -Werror:
arch/mips/dec/reset.c:22:17: error: no previous prototype for ‘dec_machine_restart’ [-Werror=missing-prototypes]
22 | void __noreturn dec_machine_restart(char *command)
| ^~~~~~~~~~~~~~~~~~~
arch/mips/dec/reset.c:27:17: error: no previous prototype for ‘dec_machine_halt’ [-Werror=missing-prototypes]
27 | void __noreturn dec_machine_halt(void)
| ^~~~~~~~~~~~~~~~
arch/mips/dec/reset.c:32:17: error: no previous prototype for ‘dec_machine_power_off’ [-Werror=missing-prototypes]
32 | void __noreturn dec_machine_power_off(void)
| ^~~~~~~~~~~~~~~~~~~~~
arch/mips/dec/reset.c:38:13: error: no previous prototype for ‘dec_intr_halt’ [-Werror=missing-prototypes]
38 | irqreturn_t dec_intr_halt(int irq, void *dev_id)
| ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:207: arch/mips/dec/reset.o] Error 1
make[7]: *** Waiting for unfinished jobs....
In passing, also correct the include file ordering in setup.c as it
doesn't merit a separate commit.
Link: https://lore.kernel.org/all/Z8A0JeFYfBxXOFCD@xxxxxxxxxxxxxxxx/
Signed-off-by: WangYuli <wangyuli@xxxxxxxxxxxxx>
---
arch/mips/dec/prom/init.c | 3 +--
arch/mips/dec/reset.c | 2 ++
arch/mips/dec/setup.c | 9 ++-------
arch/mips/include/asm/dec/reset.h | 20 ++++++++++++++++++++
4 files changed, 25 insertions(+), 9 deletions(-)
create mode 100644 arch/mips/include/asm/dec/reset.h