Linux-MIPS Archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] MIPS: DEC: Fix prototypes for halt/reset handlers
Date: Mon, 4 May 2026 21:14:08 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2605042103140.46195@angie.orcam.me.uk> (raw)
In-Reply-To: <alpine.DEB.2.21.2605042005080.46195@angie.orcam.me.uk>

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>
---
 arch/mips/dec/reset.c             |    2 ++
 arch/mips/dec/setup.c             |    6 +-----
 arch/mips/include/asm/dec/reset.h |   19 +++++++++++++++++++
 3 files changed, 22 insertions(+), 5 deletions(-)

linux-mips-dec-reset.diff
Index: linux-macro/arch/mips/dec/reset.c
===================================================================
--- linux-macro.orig/arch/mips/dec/reset.c
+++ linux-macro/arch/mips/dec/reset.c
@@ -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: linux-macro/arch/mips/dec/setup.c
===================================================================
--- linux-macro.orig/arch/mips/dec/setup.c
+++ linux-macro/arch/mips/dec/setup.c
@@ -48,14 +48,10 @@
 #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);
Index: linux-macro/arch/mips/include/asm/dec/reset.h
===================================================================
--- /dev/null
+++ linux-macro/arch/mips/include/asm/dec/reset.h
@@ -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 */

  parent reply	other threads:[~2026-05-04 20:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 20:13 [PATCH 0/3] MIPS: DEC: Fix missing platform prototypes Maciej W. Rozycki
2026-05-04 20:13 ` [PATCH 1/3] MIPS: Make do_IRQ() available for assembly callers Maciej W. Rozycki
2026-05-04 20:14 ` [PATCH 2/3] MIPS: DEC: Remove do_IRQ() call indirection Maciej W. Rozycki
2026-05-04 20:14 ` Maciej W. Rozycki [this message]
2026-05-26 14:44 ` [PATCH 0/3] MIPS: DEC: Fix missing platform prototypes Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2605042103140.46195@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).