BUG_ON() Conversion in
Subsystems (3)
PATCH 3/5 BUG_ON() Conversion in
hi,
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.
Signed-off-by Eric Sesterhenn <[email protected]>
drivers/s390/block/dasd_erp.c renamed from drivers/s390/block/dasd_erp.c.orig +3 -5
@@ -33,9 +33,8 @@ dasd_alloc_erp_request(char *magic, intint size;/* Sanity checks */ -if ( magic ==NULL || datasize >PAGE_SIZE || - (cplength*sizeof (struct ccw1 )) >PAGE_SIZE ) -BUG (); +BUG_ON ( magic ==NULL || datasize >PAGE_SIZE || + (cplength*sizeof (struct ccw1 )) >PAGE_SIZE ); size = (sizeof (struct dasd_ccw_req ) +7L ) &-8L ;if (cplength >0 )
@@ -126,8 +125,7 @@ dasd_default_erp_postaction(struct dasd_struct dasd_device *device;int success; -if (cqr->refers ==NULL || cqr->function ==NULL ) -BUG (); +BUG_ON (cqr->refers ==NULL || cqr->function ==NULL ); device = cqr->device; success = cqr->status ==DASD_CQR_DONE ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors