On Thu, Feb 22, 2018 at 8:44 PM, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote: > On Thu, Feb 22, 2018 at 08:32:36PM +0530, Souptick Joarder wrote: >> On Thu, Feb 22, 2018 at 7:40 PM, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote: >> > On Sat, Feb 17, 2018 at 03:41:13PM +0530, Souptick Joarder wrote: >> >> Use dma_pool_zalloc() instead of dma_pool_alloc + memset >> >> >> >> Signed-off-by: Souptick Joarder <jrdr.linux@xxxxxxxxx> >> > >> > Hmm, the memset doesn't just happen at allocation time. You haven't >> > explained why it is OK to remove the memset at these other points. >> >> Inside init_sa_dir(), reset_sa_dir() is called immediately after >> dma_pool_alloc() >> where memset was done for pointer "dir->npe_ctx". Hence removing the memset >> is fine inside reset_sa_dir() as dma_pool_zalloc() is already doing it. > > Yes but reset_sa_dir is also called from other places. Apology, Missed it. Then adding dma_pool_zalloc() not making much difference. Shall I drop this patch or send v2 ? > > Cheers, > -- > Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt