Commit db5c444e authored by Stoyan Gaydarov's avatar Stoyan Gaydarov Committed by Linus Torvalds

FRV: BUG to BUG_ON changes

Change some BUG()'s to BUG_ON()'s.
Signed-off-by: default avatarStoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d2f11bf7
...@@ -87,8 +87,7 @@ static inline void pci_dma_sync_single(struct pci_dev *hwdev, ...@@ -87,8 +87,7 @@ static inline void pci_dma_sync_single(struct pci_dev *hwdev,
dma_addr_t dma_handle, dma_addr_t dma_handle,
size_t size, int direction) size_t size, int direction)
{ {
if (direction == PCI_DMA_NONE) BUG_ON(direction == PCI_DMA_NONE);
BUG();
frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle), frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle),
(unsigned long)bus_to_virt(dma_handle) + size); (unsigned long)bus_to_virt(dma_handle) + size);
...@@ -105,9 +104,7 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev, ...@@ -105,9 +104,7 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
int nelems, int direction) int nelems, int direction)
{ {
int i; int i;
BUG_ON(direction == PCI_DMA_NONE);
if (direction == PCI_DMA_NONE)
BUG();
for (i = 0; i < nelems; i++) for (i = 0; i < nelems; i++)
frv_cache_wback_inv(sg_dma_address(&sg[i]), frv_cache_wback_inv(sg_dma_address(&sg[i]),
......
...@@ -23,8 +23,7 @@ long strncpy_from_user(char *dst, const char __user *src, long count) ...@@ -23,8 +23,7 @@ long strncpy_from_user(char *dst, const char __user *src, long count)
char *p, ch; char *p, ch;
long err = -EFAULT; long err = -EFAULT;
if (count < 0) BUG_ON(count < 0);
BUG();
p = dst; p = dst;
...@@ -76,8 +75,7 @@ long strnlen_user(const char __user *src, long count) ...@@ -76,8 +75,7 @@ long strnlen_user(const char __user *src, long count)
long err = 0; long err = 0;
char ch; char ch;
if (count < 0) BUG_ON(count < 0);
BUG();
#ifndef CONFIG_MMU #ifndef CONFIG_MMU
if ((unsigned long) src < memory_start) if ((unsigned long) src < memory_start)
......
...@@ -116,8 +116,7 @@ EXPORT_SYMBOL(dma_free_coherent); ...@@ -116,8 +116,7 @@ EXPORT_SYMBOL(dma_free_coherent);
dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
enum dma_data_direction direction) enum dma_data_direction direction)
{ {
if (direction == DMA_NONE) BUG_ON(direction == DMA_NONE);
BUG();
frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size); frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size);
...@@ -151,8 +150,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, ...@@ -151,8 +150,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
frv_cache_wback_inv(sg_dma_address(&sg[i]), frv_cache_wback_inv(sg_dma_address(&sg[i]),
sg_dma_address(&sg[i]) + sg_dma_len(&sg[i])); sg_dma_address(&sg[i]) + sg_dma_len(&sg[i]));
if (direction == DMA_NONE) BUG_ON(direction == DMA_NONE);
BUG();
return nents; return nents;
} }
......
...@@ -48,8 +48,7 @@ EXPORT_SYMBOL(dma_free_coherent); ...@@ -48,8 +48,7 @@ EXPORT_SYMBOL(dma_free_coherent);
dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
enum dma_data_direction direction) enum dma_data_direction direction)
{ {
if (direction == DMA_NONE) BUG_ON(direction == DMA_NONE);
BUG();
frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size); frv_cache_wback_inv((unsigned long) ptr, (unsigned long) ptr + size);
...@@ -81,8 +80,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, ...@@ -81,8 +80,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
void *vaddr; void *vaddr;
int i; int i;
if (direction == DMA_NONE) BUG_ON(direction == DMA_NONE);
BUG();
dampr2 = __get_DAMPR(2); dampr2 = __get_DAMPR(2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment