[PATCH 13/25] [blackfin] BUG to BUG_ON changes

From: Stoyan Gaydarov
Date: Tue Mar 10 2009 - 01:16:05 EST


Signed-off-by: Stoyan Gaydarov <stoyboyker@xxxxxxxxx>
---
arch/blackfin/include/asm/pci.h | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/arch/blackfin/include/asm/pci.h b/arch/blackfin/include/asm/pci.h
index 6127735..4934ba1 100644
--- a/arch/blackfin/include/asm/pci.h
+++ b/arch/blackfin/include/asm/pci.h
@@ -51,8 +51,7 @@ static inline void pcibios_penalize_isa_irq(int irq)
static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
size_t size, int direction)
{
- if (direction == PCI_DMA_NONE)
- BUG();
+ BUG_ON(direction == PCI_DMA_NONE);

/* return virt_to_bus(ptr); */
return (dma_addr_t) ptr;
@@ -68,9 +67,7 @@ static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
size_t size, int direction)
{
- if (direction == PCI_DMA_NONE)
- BUG();
-
+ BUG_ON(direction == PCI_DMA_NONE);
/* Nothing to do */
}

@@ -92,8 +89,7 @@ static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
- if (direction == PCI_DMA_NONE)
- BUG();
+ BUG_ON(direction == PCI_DMA_NONE);
return nents;
}

@@ -104,9 +100,7 @@ static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
static inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nents, int direction)
{
- if (direction == PCI_DMA_NONE)
- BUG();
-
+ BUG_ON(direction == PCI_DMA_NONE);
/* Nothing to do */
}

@@ -123,9 +117,7 @@ static inline void pci_dma_sync_single(struct pci_dev *hwdev,
dma_addr_t dma_handle, size_t size,
int direction)
{
- if (direction == PCI_DMA_NONE)
- BUG();
-
+ BUG_ON(direction == PCI_DMA_NONE);
/* Nothing to do */
}

@@ -139,9 +131,7 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
struct scatterlist *sg, int nelems,
int direction)
{
- if (direction == PCI_DMA_NONE)
- BUG();
-
+ BUG_ON(direction == PCI_DMA_NONE);
/* Nothing to do */
}

--
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/