* [PATCH] bug: add comments for BUG_ON() and BUG()
@ 2015-01-11 20:06 Dmitry Voytik
2015-01-11 20:06 ` Dmitry Voytik
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Voytik @ 2015-01-11 20:06 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, Dmitry Voytik
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] bug: add comments for BUG_ON() and BUG()
2015-01-11 20:06 [PATCH] bug: add comments for BUG_ON() and BUG() Dmitry Voytik
@ 2015-01-11 20:06 ` Dmitry Voytik
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Voytik @ 2015-01-11 20:06 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-arch, Dmitry Voytik
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-11 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-11 20:06 [PATCH] bug: add comments for BUG_ON() and BUG() Dmitry Voytik
2015-01-11 20:06 ` Dmitry Voytik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox