BUG_ON() Conversion in drivers/s390/block/dasd.c

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

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
Eric Sesterhenn 2006-03-24 18:48:13 +01:00 committed by Adrian Bunk
parent 3481454589
commit 7ac1e877d4
1 changed files with 4 additions and 6 deletions

View File

@ -542,9 +542,8 @@ dasd_kmalloc_request(char *magic, int cplength, int datasize,
struct dasd_ccw_req *cqr; struct dasd_ccw_req *cqr;
/* Sanity checks */ /* Sanity checks */
if ( magic == NULL || datasize > PAGE_SIZE || BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
(cplength*sizeof(struct ccw1)) > PAGE_SIZE) (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
BUG();
cqr = kzalloc(sizeof(struct dasd_ccw_req), GFP_ATOMIC); cqr = kzalloc(sizeof(struct dasd_ccw_req), GFP_ATOMIC);
if (cqr == NULL) if (cqr == NULL)
@ -584,9 +583,8 @@ dasd_smalloc_request(char *magic, int cplength, int datasize,
int size; int size;
/* Sanity checks */ /* Sanity checks */
if ( magic == NULL || datasize > PAGE_SIZE || BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
(cplength*sizeof(struct ccw1)) > PAGE_SIZE) (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
BUG();
size = (sizeof(struct dasd_ccw_req) + 7L) & -8L; size = (sizeof(struct dasd_ccw_req) + 7L) & -8L;
if (cplength > 0) if (cplength > 0)