]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
MIPS: DEC: Fix prototypes for halt/reset handlers
authorMaciej W. Rozycki <macro@orcam.me.uk>
Mon, 4 May 2026 20:14:08 +0000 (21:14 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 26 May 2026 14:35:36 +0000 (16:35 +0200)
Remove a bunch of compilation warnings for halt/reset handlers:

arch/mips/dec/reset.c:22:17: warning: no previous prototype for 'dec_machine_restart' [-Wmissing-prototypes]
   22 | void __noreturn dec_machine_restart(char *command)
      |                 ^~~~~~~~~~~~~~~~~~~
arch/mips/dec/reset.c:27:17: warning: no previous prototype for 'dec_machine_halt' [-Wmissing-prototypes]
   27 | void __noreturn dec_machine_halt(void)
      |                 ^~~~~~~~~~~~~~~~
arch/mips/dec/reset.c:32:17: warning: no previous prototype for 'dec_machine_power_off' [-Wmissing-prototypes]
   32 | void __noreturn dec_machine_power_off(void)
      |                 ^~~~~~~~~~~~~~~~~~~~~
arch/mips/dec/reset.c:38:13: warning: no previous prototype for 'dec_intr_halt'
[-Wmissing-prototypes]
   38 | irqreturn_t dec_intr_halt(int irq, void *dev_id)
      |             ^~~~~~~~~~~~~

(which get promoted to compilation errors with CONFIG_WERROR), by moving
the local prototypes from arch/mips/dec/setup.c to a dedicated header
for arch/mips/dec/reset.c to use as well.  No functional change.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/dec/reset.c
arch/mips/dec/setup.c
arch/mips/include/asm/dec/reset.h [new file with mode: 0644]

index 3df01f1da347cd663437ce4b0aad5612853f68b4..ee1ad38f4a698d5c948b2f40005b56accbc07dca 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <asm/addrspace.h>
 
+#include <asm/dec/reset.h>
+
 typedef void __noreturn (* noret_func_t)(void);
 
 static inline void __noreturn back_to_prom(void)
index abe42616498db9b3bafd2cf0e3662ca02b189611..78ad28ac16db5b831d9f42ad3ba9f1cc2c08db3a 100644 (file)
 #include <asm/dec/kn02ca.h>
 #include <asm/dec/kn03.h>
 #include <asm/dec/kn230.h>
+#include <asm/dec/reset.h>
 #include <asm/dec/system.h>
 
 
-extern void dec_machine_restart(char *command);
-extern void dec_machine_halt(void);
-extern void dec_machine_power_off(void);
-extern irqreturn_t dec_intr_halt(int irq, void *dev_id);
-
 unsigned long dec_kn_slot_base, dec_kn_slot_size;
 
 EXPORT_SYMBOL(dec_kn_slot_base);
diff --git a/arch/mips/include/asm/dec/reset.h b/arch/mips/include/asm/dec/reset.h
new file mode 100644 (file)
index 0000000..6af49f3
--- /dev/null
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ *     arch/mips/include/asm/dec/reset.h
+ *
+ *     DECstation/DECsystem halt/reset support.
+ *
+ *     Copyright (C) 2026  Maciej W. Rozycki
+ */
+#ifndef __ASM_DEC_RESET_H
+#define __ASM_DEC_RESET_H
+
+#include <linux/compiler_attributes.h>
+
+void __noreturn dec_machine_restart(char *command);
+void __noreturn dec_machine_halt(void);
+void __noreturn dec_machine_power_off(void);
+irqreturn_t dec_intr_halt(int irq, void *dev_id);
+
+#endif /* __ASM_DEC_RESET_H */