Commit e2ec771a authored by Coly Li's avatar Coly Li Committed by Vinod Koul

dma: use BUG_ON correctly in iop-adma.c, v4

This patch makes BUG_ON() usage correct in drivers/dma/iop-adma.c.

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarColy Li <bosong.ly@taobao.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 84adccfb
...@@ -619,7 +619,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest, ...@@ -619,7 +619,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest,
if (unlikely(!len)) if (unlikely(!len))
return NULL; return NULL;
BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT)); BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT);
dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", dev_dbg(iop_chan->device->common.dev, "%s len: %u\n",
__func__, len); __func__, len);
...@@ -652,7 +652,7 @@ iop_adma_prep_dma_memset(struct dma_chan *chan, dma_addr_t dma_dest, ...@@ -652,7 +652,7 @@ iop_adma_prep_dma_memset(struct dma_chan *chan, dma_addr_t dma_dest,
if (unlikely(!len)) if (unlikely(!len))
return NULL; return NULL;
BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT)); BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT);
dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", dev_dbg(iop_chan->device->common.dev, "%s len: %u\n",
__func__, len); __func__, len);
...@@ -686,7 +686,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest, ...@@ -686,7 +686,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest,
if (unlikely(!len)) if (unlikely(!len))
return NULL; return NULL;
BUG_ON(unlikely(len > IOP_ADMA_XOR_MAX_BYTE_COUNT)); BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT);
dev_dbg(iop_chan->device->common.dev, dev_dbg(iop_chan->device->common.dev,
"%s src_cnt: %d len: %u flags: %lx\n", "%s src_cnt: %d len: %u flags: %lx\n",
......
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