[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236661850-8237-19-git-send-email-stoyboyker@gmail.com>
Date: Tue, 10 Mar 2009 00:10:43 -0500
From: Stoyan Gaydarov <stoyboyker@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Stoyan Gaydarov <stoyboyker@...il.com>, chris@...kel.net
Subject: [PATCH 18/25] [xtensa] BUG to BUG_ON changes
Signed-off-by: Stoyan Gaydarov <stoyboyker@...il.com>
---
arch/xtensa/kernel/pci-dma.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c
index f5319d7..3677bd0 100644
--- a/arch/xtensa/kernel/pci-dma.c
+++ b/arch/xtensa/kernel/pci-dma.c
@@ -47,10 +47,8 @@ dma_alloc_coherent(struct device *dev,size_t size,dma_addr_t *handle,gfp_t flag)
/* We currently don't support coherent memory outside KSEG */
- if (ret < XCHAL_KSEG_CACHED_VADDR
- || ret >= XCHAL_KSEG_CACHED_VADDR + XCHAL_KSEG_SIZE)
- BUG();
-
+ BUG_ON(ret < XCHAL_KSEG_CACHED_VADDR
+ || ret >= XCHAL_KSEG_CACHED_VADDR + XCHAL_KSEG_SIZE);
if (ret != 0) {
memset((void*) ret, 0, size);
@@ -67,8 +65,7 @@ void dma_free_coherent(struct device *hwdev, size_t size,
{
long addr=(long)vaddr+XCHAL_KSEG_CACHED_VADDR-XCHAL_KSEG_BYPASS_VADDR;
- if (addr < 0 || addr >= XCHAL_KSEG_SIZE)
- BUG();
+ BUG_ON(addr < 0 || addr >= XCHAL_KSEG_SIZE);
free_pages(addr, get_order(size));
}
--
1.6.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists