Skip to contentSkip to conversation

bug: add comments for BUG_ON() and BUG()

PATCH New Dmitry Voytik 1 participant 1 message Jan 11, 2015 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bug: add comments for BUG_ON() and BUG()

---
 include/asm-generic/bug.h | 4 ++++
 1 file changed, 4 insertions(+)
include/asm-generic/bug.h +4 -0
index 630dd23..b0aa488 100644
@@ -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 { \
Signature · 1 line
1.9.1