sparc64: Fix prototype warnings in traps_64.c
authorSam Ravnborg <sam@ravnborg.org>
Sat, 30 Mar 2024 09:57:38 +0000 (10:57 +0100)
committerAndreas Larsson <andreas@gaisler.com>
Mon, 22 Apr 2024 13:33:06 +0000 (15:33 +0200)
Fix the following warnings:
arch/sparc/kernel/traps_64.c:253:6: warning: no previous prototype for ‘is_no_fault_exception’
arch/sparc/kernel/traps_64.c:2035:6: warning: no previous prototype for ‘do_mcd_err’
rch/sparc/kernel/traps_64.c:2153:6: warning: no previous prototype for ‘sun4v_nonresum_error_user_handled’

In all cases make the function static as there were no users outside
traps_64.c

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: David S. Miller <davem@davemloft.net>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Tested-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240330-sparc64-warnings-v1-2-37201023ee2f@ravnborg.org
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/kernel/traps_64.c

index dd048023bff5a3c0e769c8175f9fc32ac27e243d..28cb0d66ab40cde7bad59396e25ac4d619b31ec3 100644 (file)
@@ -250,7 +250,7 @@ void sun4v_insn_access_exception_tl1(struct pt_regs *regs, unsigned long addr, u
        sun4v_insn_access_exception(regs, addr, type_ctx);
 }
 
-bool is_no_fault_exception(struct pt_regs *regs)
+static bool is_no_fault_exception(struct pt_regs *regs)
 {
        unsigned char asi;
        u32 insn;
@@ -2032,7 +2032,7 @@ static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent,
 /* Handle memory corruption detected error which is vectored in
  * through resumable error trap.
  */
-void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent)
+static void do_mcd_err(struct pt_regs *regs, struct sun4v_error_entry ent)
 {
        if (notify_die(DIE_TRAP, "MCD error", regs, 0, 0x34,
                       SIGSEGV) == NOTIFY_STOP)
@@ -2150,9 +2150,9 @@ static unsigned long sun4v_get_vaddr(struct pt_regs *regs)
 /* Attempt to handle non-resumable errors generated from userspace.
  * Returns true if the signal was handled, false otherwise.
  */
-bool sun4v_nonresum_error_user_handled(struct pt_regs *regs,
-                                 struct sun4v_error_entry *ent) {
-
+static bool sun4v_nonresum_error_user_handled(struct pt_regs *regs,
+                                             struct sun4v_error_entry *ent)
+{
        unsigned int attrs = ent->err_attrs;
 
        if (attrs & SUN4V_ERR_ATTRS_MEMORY) {