Skip to content

Commit 4ef5651

Browse files
David Daneytorvalds
authored andcommitted
MIPS: Convert BUG() to use unreachable()
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>
1 parent a5fc5eb commit 4ef5651

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • arch/mips/include/asm

‎arch/mips/include/asm/bug.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
static inline void __noreturn BUG(void)
1212
{
1313
__asm__ __volatile__("break %0" : : "i" (BRK_BUG));
14-
/* Fool GCC into thinking the function doesn't return. */
15-
while (1)
16-
;
14+
unreachable();
1715
}
1816

1917
#define HAVE_ARCH_BUG

0 commit comments

Comments
 (0)