BUG_ON() Conversion in drivers/s390/block/dasd.c
Subsystems (3)
PATCH 1/5 BUG_ON() Conversion in drivers/s390/block/dasd.c
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.c renamed from drivers/s390/block/dasd.c.orig +4 -6
@@ -517,9 +517,8 @@ dasd_kmalloc_request(char *magic, int cpstruct dasd_ccw_req *cqr;/* 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 ); cqr =kmalloc (sizeof (struct dasd_ccw_req ),GFP_ATOMIC );if (cqr ==NULL )
@@ -562,9 +561,8 @@ dasd_smalloc_request(char *magic, int cpint 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 )
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors