> -----Original Message----- > From: dmaengine-owner@xxxxxxxxxxxxxxx [mailto:dmaengine-owner@xxxxxxxxxxxxxxx] On Behalf Of Wei Yongjun > Sent: Wednesday, September 14, 2016 7:23 PM > To: Koul, Vinod <vinod.koul@xxxxxxxxx>; Williams, Dan J <dan.j.williams@xxxxxxxxx> > Cc: Wei Yongjun <weiyongjun1@xxxxxxxxxx>; dmaengine@xxxxxxxxxxxxxxx > Subject: [PATCH -next] k3dma: Use dma_pool_alloc instead of dma_pool_alloc/memset > > From: Wei Yongjun <weiyongjun1@xxxxxxxxxx> > > Use dma_pool_alloc() rather than dma_pool_alloc() followed by I think you meant to say use dma_pool_zalloc() here. > memset with 0. > > Generated by: scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci > > Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx> > --- > drivers/dma/k3dma.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c > index 814e6e0..67fad3a 100644 > --- a/drivers/dma/k3dma.c > +++ b/drivers/dma/k3dma.c > @@ -458,13 +458,12 @@ static struct k3_dma_desc_sw *k3_dma_alloc_desc_resource(int num, > if (!ds) > return NULL; > > - ds->desc_hw = dma_pool_alloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); > + ds->desc_hw = dma_pool_zalloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); > if (!ds->desc_hw) { > dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc); > kfree(ds); > return NULL; > } > - memset(ds->desc_hw, 0, sizeof(struct k3_desc_hw) * num); > ds->desc_num = num; > return ds; > } > > -- > To unsubscribe from this list: send the line "unsubscribe dmaengine" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html