public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h
@ 2006-07-28  7:28 Rolf Eike Beer
  2006-07-28  7:47 ` Andrew Morton
  2006-07-28 17:44 ` Muli Ben-Yehuda
  0 siblings, 2 replies; 15+ messages in thread
From: Rolf Eike Beer @ 2006-07-28  7:28 UTC (permalink / raw)
  To: Andrew Morton; +Cc: trivial, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]

We have BUG_ON() right for this, don't we?

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>

---
commit e3f6da52c54970711fb90ffb0f6765f8fd0ee93e
tree 093ee6b4d8fb087a54c2c90e006b66783186aaff
parent e7156df18ec5f0ee8c9fe7ac0c0367ff9a1532e8
author Rolf Eike Beer <eike-kernel@sf-tec.de> Fri, 28 Jul 2006 09:27:31 +0200
committer Rolf Eike Beer <beer@siso-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++ ) {

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-08-07  1:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-28  7:28 [PATCH] Use BUG_ON(foo) instead of "if (foo) BUG()" in include/asm-i386/dma-mapping.h Rolf Eike Beer
2006-07-28  7:47 ` Andrew Morton
2006-08-05 11:37   ` Pavel Machek
2006-08-07  1:20     ` Adrian Bunk
2006-07-28 17:44 ` Muli Ben-Yehuda
2006-08-02 15:20   ` [PATCH] Move valid_dma_direction() from x86_64 to generic code Rolf Eike Beer
2006-08-02 18:55     ` Muli Ben-Yehuda
2006-08-03  6:25       ` Rolf Eike Beer
2006-08-03  7:23         ` Muli Ben-Yehuda
2006-08-03 21:10           ` IOMMU (Calgary) patches Duran, Leo
2006-08-03 21:25             ` Jon Mason
2006-08-03 21:35               ` Duran, Leo
2006-08-03 22:46             ` [discuss] " Andi Kleen
2006-08-02 15:22   ` [PATCH] Use valid_dma_direction() in include/asm-i386/dma-mapping.h Rolf Eike Beer
2006-08-02 18:56     ` Muli Ben-Yehuda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox