forked from luck/tmp_suning_uos_patched
FRV: BUG to BUG_ON changes
Change some BUG()'s to BUG_ON()'s. Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d2f11bf7fc
commit
db5c444eeb
|
@ -87,8 +87,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);
|
||||
|
||||
frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle),
|
||||
(unsigned long)bus_to_virt(dma_handle) + size);
|
||||
|
@ -105,9 +104,7 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
|
|||
int nelems, int direction)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (direction == PCI_DMA_NONE)
|
||||
BUG();
|
||||
BUG_ON(direction == PCI_DMA_NONE);
|
||||
|
||||
for (i = 0; i < nelems; 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)
|
|||
char *p, ch;
|
||||
long err = -EFAULT;
|
||||
|
||||
if (count < 0)
|
||||
BUG();
|
||||
BUG_ON(count < 0);
|
||||
|
||||
p = dst;
|
||||
|
||||
|
@ -76,8 +75,7 @@ long strnlen_user(const char __user *src, long count)
|
|||
long err = 0;
|
||||
char ch;
|
||||
|
||||
if (count < 0)
|
||||
BUG();
|
||||
BUG_ON(count < 0);
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
if ((unsigned long) src < memory_start)
|
||||
|
|
|
@ -116,8 +116,7 @@ EXPORT_SYMBOL(dma_free_coherent);
|
|||
dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
if (direction == DMA_NONE)
|
||||
BUG();
|
||||
BUG_ON(direction == DMA_NONE);
|
||||
|
||||
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,
|
|||
frv_cache_wback_inv(sg_dma_address(&sg[i]),
|
||||
sg_dma_address(&sg[i]) + sg_dma_len(&sg[i]));
|
||||
|
||||
if (direction == DMA_NONE)
|
||||
BUG();
|
||||
BUG_ON(direction == DMA_NONE);
|
||||
|
||||
return nents;
|
||||
}
|
||||
|
|
|
@ -48,8 +48,7 @@ EXPORT_SYMBOL(dma_free_coherent);
|
|||
dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
|
||||
enum dma_data_direction direction)
|
||||
{
|
||||
if (direction == DMA_NONE)
|
||||
BUG();
|
||||
BUG_ON(direction == DMA_NONE);
|
||||
|
||||
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,
|
|||
void *vaddr;
|
||||
int i;
|
||||
|
||||
if (direction == DMA_NONE)
|
||||
BUG();
|
||||
BUG_ON(direction == DMA_NONE);
|
||||
|
||||
dampr2 = __get_DAMPR(2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user