Commit e048a8a6 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk

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

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 5aae277e
...@@ -32,9 +32,8 @@ dasd_alloc_erp_request(char *magic, int cplength, int datasize, ...@@ -32,9 +32,8 @@ dasd_alloc_erp_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)
...@@ -125,8 +124,7 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr) ...@@ -125,8 +124,7 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr)
struct dasd_device *device; struct dasd_device *device;
int success; int success;
if (cqr->refers == NULL || cqr->function == NULL) BUG_ON(cqr->refers == NULL || cqr->function == NULL);
BUG();
device = cqr->device; device = cqr->device;
success = cqr->status == DASD_CQR_DONE; success = cqr->status == DASD_CQR_DONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment