]> git.karo-electronics.de Git - linux-beck.git/commitdiff
dma: use BUG_ON correctly in ppc4xx/adam.c, v4
authorColy Li <bosong.ly@taobao.com>
Sat, 26 Mar 2011 17:26:54 +0000 (01:26 +0800)
committerVinod Koul <vinod.koul@intel.com>
Thu, 31 Mar 2011 05:37:40 +0000 (11:07 +0530)
This patch makes BUG_ON() usage correct in drivers/dma/ppc4xx/adam.c

Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Sean MacLennan <smaclennan@pikatech.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Coly Li <bosong.ly@taobao.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ppc4xx/adma.c

index cef584533ee8a9ca5628b874b5d6c644a4ad05f4..a2b62e93a14366b080549c6a25bd8d1e8ab40d53 100644 (file)
@@ -2313,7 +2313,7 @@ static struct dma_async_tx_descriptor *ppc440spe_adma_prep_dma_memcpy(
        if (unlikely(!len))
                return NULL;
 
-       BUG_ON(unlikely(len > PPC440SPE_ADMA_DMA_MAX_BYTE_COUNT));
+       BUG_ON(len > PPC440SPE_ADMA_DMA_MAX_BYTE_COUNT);
 
        spin_lock_bh(&ppc440spe_chan->lock);
 
@@ -2354,7 +2354,7 @@ static struct dma_async_tx_descriptor *ppc440spe_adma_prep_dma_memset(
        if (unlikely(!len))
                return NULL;
 
-       BUG_ON(unlikely(len > PPC440SPE_ADMA_DMA_MAX_BYTE_COUNT));
+       BUG_ON(len > PPC440SPE_ADMA_DMA_MAX_BYTE_COUNT);
 
        spin_lock_bh(&ppc440spe_chan->lock);
 
@@ -2397,7 +2397,7 @@ static struct dma_async_tx_descriptor *ppc440spe_adma_prep_dma_xor(
                                     dma_dest, dma_src, src_cnt));
        if (unlikely(!len))
                return NULL;
-       BUG_ON(unlikely(len > PPC440SPE_ADMA_XOR_MAX_BYTE_COUNT));
+       BUG_ON(len > PPC440SPE_ADMA_XOR_MAX_BYTE_COUNT);
 
        dev_dbg(ppc440spe_chan->device->common.dev,
                "ppc440spe adma%d: %s src_cnt: %d len: %u int_en: %d\n",
@@ -2887,7 +2887,7 @@ static struct dma_async_tx_descriptor *ppc440spe_adma_prep_dma_pq(
        ADMA_LL_DBG(prep_dma_pq_dbg(ppc440spe_chan->device->id,
                                    dst, src, src_cnt));
        BUG_ON(!len);
-       BUG_ON(unlikely(len > PPC440SPE_ADMA_XOR_MAX_BYTE_COUNT));
+       BUG_ON(len > PPC440SPE_ADMA_XOR_MAX_BYTE_COUNT);
        BUG_ON(!src_cnt);
 
        if (src_cnt == 1 && dst[1] == src[0]) {