Skip to contentSkip to conversation

BUG_ON conversion for fs/xfs/

PATCH New Eric Sesterhenn 1 participant 1 message Sep 24, 2006

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

PATCH 1/1 BUG_ON conversion for fs/xfs/

hi,

this patch converts two if () BUG(); construct to BUG_ON(); which occupies less space, uses unlikely and is safer when BUG() is disabled.

fs/xfs/support/debug.c renamed from fs/xfs/support/debug.c.orig +2 -4
@@ -53,8 +53,7 @@ cmn_err(register int level, char *fmt, .
 	va_end(ap);
 	spin_unlock_irqrestore(&xfs_err_lock,flags);
 
-	if (level = CE_PANIC)
-		BUG();
+	BUG_ON(level = CE_PANIC);
 }
 
 void
@@ -72,8 +71,7 @@ icmn_err(register int level, char *fmt, 
 		strcat(message, "\n");
 	spin_unlock_irqrestore(&xfs_err_lock,flags);
 	printk("%s%s", err_level[level], message);
-	if (level = CE_PANIC)
-		BUG();
+	BUG_ON(level = CE_PANIC);
 }
 
 void

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