BUG_ON() Conversion in md/raid10.c
Subsystems (2)
PATCH 9/9 BUG_ON() Conversion in md/raid10.c
hi,
this changes if() BUG(); constructs to BUG_ON() which is cleaner and can better optimized away
Signed-off-by Eric Sesterhenn <[email protected]>
drivers/md/raid10.c renamed from drivers/md/raid10.c.orig +2 -4
@@ -1115,8 +1115,7 @@ static int end_sync_read(struct bio *biofor (i=0 ; i<conf->copies; i++)if (r10_bio->devs[i].bio == bio)break ; -if (i == conf->copies) -BUG (); +BUG_ON (i == conf->copies);update_head_pos (i, r10_bio); d = r10_bio->devs[i].devnum;
@@ -1516,8 +1515,7 @@ static int init_resync(conf_t *conf)int buffs; buffs =RESYNC_WINDOW /RESYNC_BLOCK_SIZE ; -if (conf->r10buf_pool) -BUG (); +BUG_ON (conf->r10buf_pool); conf->r10buf_pool =mempool_create (buffs, r10buf_pool_alloc, r10buf_pool_free, conf);if (!conf->r10buf_pool)return -ENOMEM ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors