diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-01-17 15:36:05 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-17 15:36:05 -0800 |
commit | 1ae613883468eab2fb8a077aad9fdedfbfa73d1b (patch) | |
tree | 137e13bddb040f4ae9a997473e847304dcd7c19e /arch | |
parent | 9eb3394bf2037120881a8846bc67064f49325366 (diff) | |
download | kernel_samsung_smdk4412-1ae613883468eab2fb8a077aad9fdedfbfa73d1b.zip kernel_samsung_smdk4412-1ae613883468eab2fb8a077aad9fdedfbfa73d1b.tar.gz kernel_samsung_smdk4412-1ae613883468eab2fb8a077aad9fdedfbfa73d1b.tar.bz2 |
[SPARC]: change if() BUG(); to BUG_ON in iommu.c
this patch changes if() BUG(); constructs
in iommu.c to BUG_ON(); so it gets save
to define BUG() and BUG_ON() to nullstatements.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/mm/iommu.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 489bf68..77840c8 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -295,8 +295,7 @@ static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus) int ioptex; int i; - if (busa < iommu->start) - BUG(); + BUG_ON(busa < iommu->start); ioptex = (busa - iommu->start) >> PAGE_SHIFT; for (i = 0; i < npages; i++) { iopte_val(iommu->page_table[ioptex + i]) = 0; @@ -340,9 +339,9 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va, iopte_t *first; int ioptex; - if ((va & ~PAGE_MASK) != 0) BUG(); - if ((addr & ~PAGE_MASK) != 0) BUG(); - if ((len & ~PAGE_MASK) != 0) BUG(); + BUG_ON((va & ~PAGE_MASK) != 0); + BUG_ON((addr & ~PAGE_MASK) != 0); + BUG_ON((len & ~PAGE_MASK) != 0); /* page color = physical address */ ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT, @@ -405,8 +404,8 @@ static void iommu_unmap_dma_area(unsigned long busa, int len) unsigned long end; int ioptex = (busa - iommu->start) >> PAGE_SHIFT; - if ((busa & ~PAGE_MASK) != 0) BUG(); - if ((len & ~PAGE_MASK) != 0) BUG(); + BUG_ON((busa & ~PAGE_MASK) != 0); + BUG_ON((len & ~PAGE_MASK) != 0); iopte += ioptex; end = busa + len; |