From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: [PATCH 4/5] The default CONFIG_BUG=n version of BUG() should have an empty do...while
Date: Wed, 15 Apr 2009 19:34:56 +0100 [thread overview]
Message-ID: <20090415183456.11029.28756.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20090415183441.11029.30619.stgit@warthog.procyon.org.uk>
The default CONFIG_BUG=n version of BUG() must incorporate an empty a
do...while statement to avoid compilation weirdness.
Signed-off-by: David Howells <dhowells@redhat.com>
---
include/asm-generic/bug.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 37b82cb..e727fe0 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -88,7 +88,7 @@ extern void warn_slowpath(const char *file, const int line,
#else /* !CONFIG_BUG */
#ifndef HAVE_ARCH_BUG
-#define BUG()
+#define BUG() do {} while(0)
#endif
#ifndef HAVE_ARCH_BUG_ON
next prev parent reply other threads:[~2009-04-15 18:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-15 18:34 [PATCH 1/5] MN10300: Discard duplicate PFN_xxx() macros David Howells
2009-04-15 18:34 ` [PATCH 2/5] MN10300: Wire up missing system calls David Howells
2009-04-15 18:34 ` [PATCH 3/5] MN10300: Stop gcc from generating uninitialised variable warnings after BUG() David Howells
2009-04-15 18:34 ` David Howells [this message]
2009-04-15 18:35 ` [PATCH 5/5] RCU: Don't try and predeclare inline funcs as it upsets some versions of gcc David Howells
2009-04-17 23:41 ` Paul E. McKenney
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=20090415183456.11029.28756.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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®