Skip to content

Commit

Permalink
h8300: Fix die()
Browse files Browse the repository at this point in the history
Fix h8300's die() to take care of a number of problems:

    CC      arch/h8300/kernel/traps.o
  In file included from arch/h8300/include/asm/bitops.h:10,
                   from include/linux/bitops.h:22,
                   from include/linux/kernel.h:17,
                   from include/linux/sched.h:54,
                   from arch/h8300/kernel/traps.c:18:
  arch/h8300/include/asm/system.h:136: warning: 'struct pt_regs' declared inside parameter list
  arch/h8300/include/asm/system.h:136: warning: its scope is only this definition or declaration, which is probably not what you want
  arch/h8300/kernel/traps.c:100: error: conflicting types for 'die'
  arch/h8300/include/asm/system.h:136: error: previous declaration of 'die' was here
  make[2]: *** [arch/h8300/kernel/traps.o] Error 1

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and torvalds committed Sep 7, 2010
1 parent 3ab61eb commit b857189
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arch/h8300/include/asm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include <linux/linkage.h>

struct pt_regs;

/*
* switch_to(n) should switch tasks to task ptr, first checking that
* ptr isn't the current task, in which case it does nothing. This
Expand Down Expand Up @@ -155,6 +157,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz

#define arch_align_stack(x) (x)

void die(char *str, struct pt_regs *fp, unsigned long err);
extern void die(const char *str, struct pt_regs *fp, unsigned long err);

#endif /* _H8300_SYSTEM_H */
2 changes: 1 addition & 1 deletion arch/h8300/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static void dump(struct pt_regs *fp)
printk("\n\n");
}

void die(char *str, struct pt_regs *fp, unsigned long err)
void die(const char *str, struct pt_regs *fp, unsigned long err)
{
static int diecount;

Expand Down

0 comments on commit b857189

Please sign in to comment.