Skip to contentSkip to conversation

BUG_ON() Conversion in md/bitmap.c

PATCH In review Eric Sesterhenn / snakebyte 1 participant 1 message Jan 25, 2006 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 BUG_ON() Conversion in md/bitmap.c

hi,

this changes if() BUG(); constructs to BUG_ON() which is cleaner and can better optimized away

drivers/md/bitmap.c renamed from drivers/md/bitmap.c.orig +1 -1
@@ -1309,7 +1309,7 @@ int bitmap_startwrite(struct bitmap *bit
 		case 1:
 			*bmc = 2;
 		}
-		if ((*bmc & COUNTER_MAX) == COUNTER_MAX) BUG();
+		BUG_ON((*bmc & COUNTER_MAX) == COUNTER_MAX);
 		(*bmc)++;
 
 		spin_unlock_irq(&bitmap->lock);

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