Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / ide / ide-dma.c
index c481be8..7c3a13e 100644 (file)
@@ -74,7 +74,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -206,8 +205,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);
 
@@ -752,7 +750,7 @@ void ide_dma_verbose(ide_drive_t *drive)
                        goto bug_dma_off;
                printk(", DMA");
        } else if (id->field_valid & 1) {
-               printk(", BUG");
+               goto bug_dma_off;
        }
        return;
 bug_dma_off:
@@ -947,8 +945,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);