Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Dmitry Voytik <voytikd@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Dmitry Voytik <voytikd@gmail.com>
Subject: [PATCH] bug: add comments for BUG_ON() and BUG()
Date: Sun, 11 Jan 2015 23:06:18 +0300	[thread overview]
Message-ID: <1421006778-11148-1-git-send-email-voytikd@gmail.com> (raw)

Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
---
 include/asm-generic/bug.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 630dd23..b0aa488 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -43,6 +43,10 @@ struct bug_entry {
  * If you're tempted to BUG(), think again:  is completely giving up
  * really the *only* solution?  There are usually better options, where
  * users don't need to reboot ASAP and can mostly shut down cleanly.
+ *
+ * Use BUG_ON(unexpected_fatal_condition) instead of just:
+ * if (unexpected_fatal_condition)
+ *	BUG();
  */
 #ifndef HAVE_ARCH_BUG
 #define BUG() do { \
-- 
1.9.1

             reply	other threads:[~2015-01-11 20:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-11 20:06 Dmitry Voytik [this message]
2015-01-11 20:06 ` [PATCH] bug: add comments for BUG_ON() and BUG() Dmitry Voytik

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=1421006778-11148-1-git-send-email-voytikd@gmail.com \
    --to=voytikd@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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