diff options
-rw-r--r-- | arch/frv/include/asm/pci.h | 7 | ||||
-rw-r--r-- | arch/frv/kernel/uaccess.c | 6 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-dma-nommu.c | 6 | ||||
-rw-r--r-- | arch/frv/mb93090-mb00/pci-dma.c | 6 |
4 files changed, 8 insertions, 17 deletions
diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h index 585d9b49949a..cc685e60b0f9 100644 --- a/arch/frv/include/asm/pci.h +++ b/arch/frv/include/asm/pci.h | |||
@@ -87,8 +87,7 @@ static inline void pci_dma_sync_single(struct pci_dev *hwdev, | |||
87 | dma_addr_t dma_handle, | 87 | dma_addr_t dma_handle, |
88 | size_t size, int direction) | 88 | size_t size, int direction) |
89 | { | 89 | { |
90 | if (direction == PCI_DMA_NONE) | 90 | BUG_ON(direction == PCI_DMA_NONE); |
91 | BUG(); | ||
92 | 91 | ||
93 | frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle), | 92 | frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle), |
94 | (unsigned long)bus_to_virt(dma_handle) + size); | 93 | (unsigned long)bus_to_virt(dma_handle) + size); |
@@ -105,9 +104,7 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev, | |||
105 | int nelems, int direction) | 104 | int nelems, int direction) |
106 | { | 105 | { |
107 | int i; | 106 | int i; |
108 | 107 | BUG_ON(direction == PCI_DMA_NONE); | |
109 | if (direction == PCI_DMA_NONE) | ||
110 | BUG(); | ||
111 | 108 | ||
112 | for (i = 0; i < nelems; i++) | 109 | for (i = 0; i < nelems; i++) |
113 | frv_cache_wback_inv(sg_dma_address(&sg[i]), | 110 | frv_cache_wback_inv(sg_dma_address(&sg[i]), |
diff --git a/arch/frv/kernel/uaccess.c b/arch/frv/kernel/uaccess.c index 9fb771a20df3..374f88d6cc00 100644 --- a/arch/frv/kernel/uaccess.c +++ b/arch/frv/kernel/uaccess.c | |||
@@ -23,8 +23,7 @@ long strncpy_from_user(char *dst, const char __user *src, long count) | |||
23 | char *p, ch; | 23 | char *p, ch; |
24 | long err = -EFAULT; | 24 | long err = -EFAULT; |
25 | 25 | ||
26 | if (count < 0) | 26 | BUG_ON(count < 0); |
27 | BUG(); | ||
28 | 27 | ||
29 | p = dst; | 28 | p = dst; |
30 | 29 | ||
@@ -76,8 +75,7 @@ long strnlen_user(const char __user *src, long count) | |||
76 | long err = 0; | 75 | long err = 0; |
77 | char ch; | 76 | char ch; |
78 | 77 | ||
79 | if (count < 0) | 78 | BUG_ON(count < 0); |
80 | BUG(); | ||
81 | 79 | ||
82 | #ifndef CONFIG_MMU | 80 | #ifndef CONFIG_MMU |
83 | if ((unsigned long) src < memory_start) | 81 | if ((unsigned long) src < memory_start) |
diff --git a/arch/frv/mb93090-mb00/pci-dma-nommu.c b/arch/frv/mb93090-mb00/pci-dma-nommu.c index 52ff9aec799d..4e1ba0b15443 100644 --- a/arch/frv/mb93090-mb00/pci-dma-nommu.c +++ b/arch/frv/mb93090-mb00/pci-dma-nommu.c | |||
@@ -116,8 +116,7 @@ EXPORT_SYMBOL(dma_free_coherent); | |||
116 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 116 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
117 | enum dma_data_direction direction) | 117 | enum dma_data_direction direction) |
118 | { | 118 | { |
119 | if (direction == DMA_NONE) | 119 | BUG_ON(direction == DMA_NONE); |
120 | BUG(); | ||
121 | 120 | ||
122 | frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size); | 121 | frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size); |
123 | 122 | ||
@@ -151,8 +150,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
151 | frv_cache_wback_inv(sg_dma_address(&sg[i]), | 150 | frv_cache_wback_inv(sg_dma_address(&sg[i]), |
152 | sg_dma_address(&sg[i]) + sg_dma_len(&sg[i])); | 151 | sg_dma_address(&sg[i]) + sg_dma_len(&sg[i])); |
153 | 152 | ||
154 | if (direction == DMA_NONE) | 153 | BUG_ON(direction == DMA_NONE); |
155 | BUG(); | ||
156 | 154 | ||
157 | return nents; | 155 | return nents; |
158 | } | 156 | } |
diff --git a/arch/frv/mb93090-mb00/pci-dma.c b/arch/frv/mb93090-mb00/pci-dma.c index 3ddedebc4eb3..45954f0813dc 100644 --- a/arch/frv/mb93090-mb00/pci-dma.c +++ b/arch/frv/mb93090-mb00/pci-dma.c | |||
@@ -48,8 +48,7 @@ EXPORT_SYMBOL(dma_free_coherent); | |||
48 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, | 48 | dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, |
49 | enum dma_data_direction direction) | 49 | enum dma_data_direction direction) |
50 | { | 50 | { |
51 | if (direction == DMA_NONE) | 51 | BUG_ON(direction == DMA_NONE); |
52 | BUG(); | ||
53 | 52 | ||
54 | frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size); | 53 | frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size); |
55 | 54 | ||
@@ -81,8 +80,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
81 | void *vaddr; | 80 | void *vaddr; |
82 | int i; | 81 | int i; |
83 | 82 | ||
84 | if (direction == DMA_NONE) | 83 | BUG_ON(direction == DMA_NONE); |
85 | BUG(); | ||
86 | 84 | ||
87 | dampr2 = __get_DAMPR(2); | 85 | dampr2 = __get_DAMPR(2); |
88 | 86 | ||