Skip to contentSkip to conversation

change if() BUG(); to BUG_ON() in mm/pdflush.c

PATCH New Eric Sesterhenn / snakebyte 1 participant 2 messages Jan 16, 2006 – Jan 17, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 change if() BUG(); to BUG_ON() in mm/pdflush.c

hi,

this changes an if() BUG(); statement to
BUG_ON() in mm/pdflush.c

mm/pdflush.c renamed from mm/pdflush.c.orig +1 -2
@@ -202,8 +202,7 @@ int pdflush_operation(void (*fn)(unsigne
 	unsigned long flags;
 	int ret = 0;
 
-	if (fn == NULL)
-		BUG();		/* Hard to diagnose if it's deferred */
+	BUG_ON(fn == NULL);	/* Hard to diagnose if it's deferred */
 
 	spin_lock_irqsave(&pdflush_lock, flags);
 	if (list_empty(&pdflush_list)) {

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

PATCH 1/1 change if() BUG(); to BUG_ON() in

hi,

this patch changes the if() BUG(); construct in drivers/net/ixgb/ixgb_osdep.h to a BUG_ON; so defining BUG to a no-op is safe.

drivers/net/ixgb/ixgb_osdep.h renamed from drivers/net/ixgb/ixgb_osdep.h.orig +1 -1
@@ -60,7 +60,7 @@ typedef enum {
 } boolean_t;
 
 #undef ASSERT
-#define ASSERT(x)	if(!(x)) BUG()
+#define ASSERT(x)	BUG_ON(!(x))
 #define MSGOUT(S, A, B)	printk(KERN_DEBUG S "\n", A, B)
 
 #ifdef DBG

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors