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

2018-02-22 Thread Souptick Joarder
On Thu, Feb 22, 2018 at 9:12 PM, Herbert Xu  wrote:
> On Thu, Feb 22, 2018 at 08:54:27PM +0530, Souptick Joarder wrote:
>>
>> Apology, Missed it. Then adding dma_pool_zalloc() not making much difference.
>> Shall I drop this patch or send v2 ?
>
> I think we should probably leave it alone.
>
> Thanks,

Sure :)

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


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

2018-02-22 Thread Herbert Xu
On Thu, Feb 22, 2018 at 08:54:27PM +0530, Souptick Joarder wrote:
>
> Apology, Missed it. Then adding dma_pool_zalloc() not making much difference.
> Shall I drop this patch or send v2 ?

I think we should probably leave it alone.

Thanks,
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


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

2018-02-22 Thread Souptick Joarder
On Thu, Feb 22, 2018 at 8:44 PM, Herbert Xu  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  
>> 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 
>> >
>> > 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 
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


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

2018-02-22 Thread Herbert Xu
On Thu, Feb 22, 2018 at 08:32:36PM +0530, Souptick Joarder wrote:
> On Thu, Feb 22, 2018 at 7:40 PM, Herbert Xu  
> 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 
> >
> > 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 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


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

2018-02-22 Thread Souptick Joarder
On Thu, Feb 22, 2018 at 7:40 PM, Herbert Xu  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 
>
> 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.

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


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

2018-02-22 Thread Herbert Xu
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 

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.

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