Skip to content

Commit

Permalink
sparc32: fix sparse warning in traps_32.c
Browse files Browse the repository at this point in the history
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Apr 29, 2014
1 parent a2b0aa9 commit fcd0196
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/sparc/include/asm/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ extern void do_BUG(const char *file, int line);
#include <asm-generic/bug.h>

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
2 changes: 1 addition & 1 deletion arch/sparc/kernel/traps_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fcd0196

Please sign in to comment.