dmaengine: cppi: remove unused and bogus check
authorVinod Koul <vinod.koul@intel.com>
Fri, 8 Jul 2016 05:00:57 +0000 (10:30 +0530)
committerVinod Koul <vinod.koul@intel.com>
Sat, 23 Jul 2016 10:37:27 +0000 (16:07 +0530)
In cppi41_dma_prep_slave_sg() variable num is initialized to zero, but never
updated and a BUG_ON is checked for it being greater than zero which will be
always false.

Remove the bogus check and this variable

Reported-by: David Binderman <linuxdev.baldrick@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/cppi41.c

index ceedafbd23e01fcda6968fb04707ae141cff3a88..4b2317426c8e3851fc172002ddc50be1bcf69135 100644 (file)
@@ -497,16 +497,13 @@ static struct dma_async_tx_descriptor *cppi41_dma_prep_slave_sg(
        struct cppi41_desc *d;
        struct scatterlist *sg;
        unsigned int i;
-       unsigned int num;
 
-       num = 0;
        d = c->desc;
        for_each_sg(sgl, sg, sg_len, i) {
                u32 addr;
                u32 len;
 
                /* We need to use more than one desc once musb supports sg */
-               BUG_ON(num > 0);
                addr = lower_32_bits(sg_dma_address(sg));
                len = sg_dma_len(sg);
 
This page took 0.024179 seconds and 5 git commands to generate.