[PATCH 11/25] [alpha] BUG to BUG_ON changes

From: Stoyan Gaydarov
Date: Tue Mar 10 2009 - 01:15:19 EST


Signed-off-by: Stoyan Gaydarov <stoyboyker@xxxxxxxxx>
---
arch/alpha/kernel/pci_iommu.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index b9094da..9ebaca2 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -310,8 +310,7 @@ pci_map_single(struct pci_dev *pdev, void *cpu_addr, size_t size, int dir)
{
int dac_allowed;

- if (dir == PCI_DMA_NONE)
- BUG();
+ BUG_ON(dir == PCI_DMA_NONE);

dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0;
return pci_map_single_1(pdev, cpu_addr, size, dac_allowed);
@@ -324,8 +323,7 @@ pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset,
{
int dac_allowed;

- if (dir == PCI_DMA_NONE)
- BUG();
+ BUG_ON(dir == PCI_DMA_NONE);

dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0;
return pci_map_single_1(pdev, (char *)page_address(page) + offset,
@@ -348,8 +346,7 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
struct pci_iommu_arena *arena;
long dma_ofs, npages;

- if (direction == PCI_DMA_NONE)
- BUG();
+ BUG_ON(direction == PCI_DMA_NONE);

if (dma_addr >= __direct_map_base
&& dma_addr < __direct_map_base + __direct_map_size) {
@@ -641,8 +638,7 @@ pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
int dac_allowed;
struct device *dev;

- if (direction == PCI_DMA_NONE)
- BUG();
+ BUG_ON(direction == PCI_DMA_NONE);

dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0;

@@ -723,8 +719,7 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
dma_addr_t max_dma;
dma_addr_t fbeg, fend;

- if (direction == PCI_DMA_NONE)
- BUG();
+ BUG_ON(direction == PCI_DMA_NONE);

if (! alpha_mv.mv_pci_tbi)
return;
--
1.6.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/