]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h
authorRolf Eike Beer <eike-kernel@sf-tec.de>
Tue, 26 Sep 2006 06:32:20 +0000 (23:32 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:55 +0000 (08:48 -0700)
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-i386/dma-mapping.h

index 9cf20cacf76e8cf61cc9e6157a7a4acdb42b783d..576ae01d71c81d98d91357c55a56ddbeee1499e6 100644 (file)
@@ -21,8 +21,7 @@ static inline dma_addr_t
 dma_map_single(struct device *dev, void *ptr, size_t size,
               enum dma_data_direction direction)
 {
-       if (direction == DMA_NONE)
-               BUG();
+       BUG_ON(direction == DMA_NONE);
        WARN_ON(size == 0);
        flush_write_buffers();
        return virt_to_phys(ptr);
@@ -32,8 +31,7 @@ static inline void
 dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
                 enum dma_data_direction direction)
 {
-       if (direction == DMA_NONE)
-               BUG();
+       BUG_ON(direction == DMA_NONE);
 }
 
 static inline int
@@ -42,8 +40,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 {
        int i;
 
-       if (direction == DMA_NONE)
-               BUG();
+       BUG_ON(direction == DMA_NONE);
        WARN_ON(nents == 0 || sg[0].length == 0);
 
        for (i = 0; i < nents; i++ ) {