]> err.no Git - linux-2.6/blobdiff - drivers/ide/ide-dma.c
[SCSI] atp870u: reduce huge stack usage
[linux-2.6] / drivers / ide / ide-dma.c
index c481be8b807f6fe9345ce20bdfd0da16d8eaeee2..783a2475ee8b12519e33adac7e69f1c55219b22d 100644 (file)
@@ -206,8 +206,7 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq)
        ide_hwif_t *hwif = HWIF(drive);
        struct scatterlist *sg = hwif->sg_table;
 
-       if ((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256)
-               BUG();
+       BUG_ON((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256);
 
        ide_map_sg(drive, rq);
 
@@ -947,8 +946,7 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
        }
        printk("\n");
 
-       if (!(hwif->dma_master))
-               BUG();
+       BUG_ON(!hwif->dma_master);
 }
 
 EXPORT_SYMBOL_GPL(ide_setup_dma);