Skip to content

Commit

Permalink
BUG_ON() Conversion in drivers/s390/block/dasd_erp.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sesterhenn authored and Adrian Bunk committed Mar 31, 2006
1 parent 5aae277 commit e048a8a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/s390/block/dasd_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ dasd_alloc_erp_request(char *magic, int cplength, int datasize,
int 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)
Expand Down Expand Up @@ -125,8 +124,7 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr)
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;
Expand Down

0 comments on commit e048a8a

Please sign in to comment.