aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386')
-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
21dma_map_single(struct device *dev, void *ptr, size_t size, 21dma_map_single(struct device *dev, void *ptr, size_t size,
22 enum dma_data_direction direction) 22 enum dma_data_direction direction)
23{ 23{
24 if (direction == DMA_NONE) 24 BUG_ON(direction == DMA_NONE);
25 BUG();
26 WARN_ON(size == 0); 25 WARN_ON(size == 0);
27 flush_write_buffers(); 26 flush_write_buffers();
28 return virt_to_phys(ptr); 27 return virt_to_phys(ptr);
@@ -32,8 +31,7 @@ static inline void
32dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, 31dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
33 enum dma_data_direction direction) 32 enum dma_data_direction direction)
34{ 33{
35 if (direction == DMA_NONE) 34 BUG_ON(direction == DMA_NONE);
36 BUG();
37} 35}
38 36
39static inline int 37static inline int
@@ -42,8 +40,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
42{ 40{
43 int i; 41 int i;
44 42
45 if (direction == DMA_NONE) 43 BUG_ON(direction == DMA_NONE);
46 BUG();
47 WARN_ON(nents == 0 || sg[0].length == 0); 44 WARN_ON(nents == 0 || sg[0].length == 0);
48 45
49 for (i = 0; i < nents; i++ ) { 46 for (i = 0; i < nents; i++ ) {