diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 37b8cda3e8bc909c02d38fbf02e99fded1d1d88a..9bdea2a5cf0e4605e33116529013006da84e8786 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -228,8 +228,7 @@ static void *slice_dma_loaf(struct dma_loaf *loaf, size_t len, void *cpu_end = loaf->cpu_free + len; void *cpu_addr = loaf->cpu_free; - if (cpu_end > loaf->cpu_base + loaf->length) - BUG(); + BUG_ON(cpu_end > loaf->cpu_base + loaf->length); *dma_handle = loaf->dma_free; loaf->cpu_free = cpu_end; loaf->dma_free += len; diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 1f2890989b56086f7b175475bfb2cf3a6a6d48c8..71ec9e6643836dac7de6c12a894816bd7b0631d8 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -2361,8 +2361,7 @@ static void do_cciss_request(request_queue_t *q) if (!creq) goto startio; - if (creq->nr_phys_segments > MAXSGENTRIES) - BUG(); + BUG_ON(creq->nr_phys_segments > MAXSGENTRIES); if (( c = cmd_alloc(h, 1)) == NULL) goto full; diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index 9e35de05d5c551b91aee24f908804a7da40a80f2..0e66e904bd8cd93d986414870c956ef63b855146 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -1316,7 +1316,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd cp->Request.Timeout = 0; memset(cp->Request.CDB, 0, sizeof(cp->Request.CDB)); - if (cmd->cmd_len > sizeof(cp->Request.CDB)) BUG(); + BUG_ON(cmd->cmd_len > sizeof(cp->Request.CDB)); cp->Request.CDBLen = cmd->cmd_len; memcpy(cp->Request.CDB, cmd->cmnd, cmd->cmd_len); cp->Request.Type.Type = TYPE_CMD; diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c index 862b9abac0aea0943298aa61bc581ba14fa8edc5..b6ea2f0c72763c3b8df3a67c89a785f36841e2c1 100644 --- a/drivers/block/cpqarray.c +++ b/drivers/block/cpqarray.c @@ -906,8 +906,7 @@ static void do_ida_request(request_queue_t *q) if (!creq) goto startio; - if (creq->nr_phys_segments > SG_MAX) - BUG(); + BUG_ON(creq->nr_phys_segments > SG_MAX); if ((c = cmd_alloc(h,1)) == NULL) goto startio;