From fcd0196b7eb17a8b696a1263281bcdb9eedcfbc0 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 21 Apr 2014 21:39:21 +0200 Subject: [PATCH] sparc32: fix sparse warning in traps_32.c Fix following warning: traps_32.c:47:6: error: symbol 'die_if_kernel' redeclared with different type - different modifiers Add __noreturn to both definition and declaration Signed-off-by: Sam Ravnborg Signed-off-by: David S. Miller --- arch/sparc/include/asm/bug.h | 2 +- arch/sparc/kernel/traps_32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/bug.h b/arch/sparc/include/asm/bug.h index 6bd9f43cb5a5..a24cbb16d0eb 100644 --- a/arch/sparc/include/asm/bug.h +++ b/arch/sparc/include/asm/bug.h @@ -20,6 +20,6 @@ extern void do_BUG(const char *file, int line); #include struct pt_regs; -extern void die_if_kernel(char *str, struct pt_regs *regs) __attribute__ ((noreturn)); +void __noreturn die_if_kernel(char *str, struct pt_regs *regs); #endif diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c index 662982946a89..a655e5bf92a7 100644 --- a/arch/sparc/kernel/traps_32.c +++ b/arch/sparc/kernel/traps_32.c @@ -44,7 +44,7 @@ static void instruction_dump(unsigned long *pc) #define __SAVE __asm__ __volatile__("save %sp, -0x40, %sp\n\t") #define __RESTORE __asm__ __volatile__("restore %g0, %g0, %g0\n\t") -void die_if_kernel(char *str, struct pt_regs *regs) +void __noreturn die_if_kernel(char *str, struct pt_regs *regs) { static int die_counter; int count = 0; -- 2.20.1