summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Eike Beer2006-09-26 08:32:20 +0200
committerLinus Torvalds2006-09-26 17:48:55 +0200
commit3a750363e6075a28e5542ce93a69c620c0cfd605 (patch)
tree4585aa2dbd2a8419ff2d52d5c0148cbb10502b42
parent[PATCH] i386: show_registers(): try harder to print failing code (diff)
downloadkernel-qcow2-linux-3a750363e6075a28e5542ce93a69c620c0cfd605.tar.gz
kernel-qcow2-linux-3a750363e6075a28e5542ce93a69c620c0cfd605.tar.xz
kernel-qcow2-linux-3a750363e6075a28e5542ce93a69c620c0cfd605.zip
[PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h
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>
-rw-r--r--include/asm-i386/dma-mapping.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h
index 9cf20cacf76e..576ae01d71c8 100644
--- a/include/asm-i386/dma-mapping.h
+++ b/include/asm-i386/dma-mapping.h
@@ -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++ ) {