Jelajahi Sumber

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>
David Daney 15 tahun lalu
induk
melakukan
4ef5651e85
1 mengubah file dengan 1 tambahan dan 3 penghapusan
  1. 1 3
      arch/mips/include/asm/bug.h

+ 1 - 3
arch/mips/include/asm/bug.h

@@ -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