[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200607280928.54306.eike-kernel@sf-tec.de>
Date: Fri, 28 Jul 2006 09:28:49 +0200
From: Rolf Eike Beer <eike-kernel@...tec.de>
To: Andrew Morton <akpm@...l.org>
Cc: trivial@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h
We have BUG_ON() right for this, don't we?
Signed-off-by: Rolf Eike Beer <eike-kernel@...tec.de>
---
commit e3f6da52c54970711fb90ffb0f6765f8fd0ee93e
tree 093ee6b4d8fb087a54c2c90e006b66783186aaff
parent e7156df18ec5f0ee8c9fe7ac0c0367ff9a1532e8
author Rolf Eike Beer <eike-kernel@...tec.de> Fri, 28 Jul 2006 09:27:31 +0200
committer Rolf Eike Beer <beer@...o-eb-i34d.silicon-software.de> Fri, 28 Jul 2006 09:27:31 +0200
include/asm-i386/dma-mapping.h | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h
index 9cf20ca..576ae01 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 sc
{
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++ ) {
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists