Re: [PATCH] crypto: ixp4xxx: Use dma_pool_zalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux