From: David Daney <ddaney@caviumnetworks.com>
To: torvalds@linux-foundation.org, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
David Daney <ddaney@caviumnetworks.com>,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org
Subject: [PATCH 3/5] MIPS: Convert BUG() to use unreachable()
Date: Fri, 4 Dec 2009 17:44:52 -0800 [thread overview]
Message-ID: <1259977494-24636-3-git-send-email-ddaney@caviumnetworks.com> (raw)
In-Reply-To: <4B19BAD3.1000808@caviumnetworks.com>
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: Ralf Baechle <ralf@linux-mips.org>
CC: linux-mips@linux-mips.org
---
arch/mips/include/asm/bug.h | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/mips/include/asm/bug.h b/arch/mips/include/asm/bug.h
index 6cf29c2..540c98a 100644
--- a/arch/mips/include/asm/bug.h
+++ b/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
--
1.6.2.5
next prev parent reply other threads:[~2009-12-05 2:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-05 1:43 [PATCH 0/5] Add support for GCC's __builtin_unreachable() and use it in BUG (v2.1) David Daney
2009-12-05 1:44 ` [PATCH 1/5] Add support for GCC-4.5's __builtin_unreachable() to compiler.h (v2) David Daney
2009-12-05 1:44 ` [PATCH 2/5] x86: Convert BUG() to use unreachable() David Daney
2009-12-05 1:44 ` David Daney [this message]
2009-12-05 1:44 ` [PATCH 4/5] s390: " David Daney
2009-12-05 1:44 ` [PATCH 5/5] avr32: " David Daney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1259977494-24636-3-git-send-email-ddaney@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=akpm@linux-foundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®