Skip to content

Commit

Permalink
MIPS: Convert BUG() to use unreachable()
Browse files Browse the repository at this point in the history
Use the new unreachable() macro instead of while(1);

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Daney authored and Linus Torvalds committed Dec 5, 2009
1 parent a5fc5eb commit 4ef5651
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/mips/include/asm/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
static inline void __noreturn BUG(void)
{
__asm__ __volatile__("break %0" : : "i" (BRK_BUG));
/* Fool GCC into thinking the function doesn't return. */
while (1)
;
unreachable();
}

#define HAVE_ARCH_BUG
Expand Down

0 comments on commit 4ef5651

Please sign in to comment.