Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-06 Thread Dan Carpenter
On Fri, May 01, 2020 at 10:40:20AM -0500, Richard Gong wrote: > Hi, > > On 4/29/20 1:52 AM, Christophe JAILLET wrote: > > Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and > > shorter 'devm_kcalloc(...)'. > > > It doesn't make much sense. > Actually devm_kcalloc returns devm_

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-05 Thread Richard Gong
Hi, On 5/2/20 3:49 AM, Christophe JAILLET wrote: Le 01/05/2020 à 18:55, Richard Gong a écrit : Hi, On 5/1/20 10:48 AM, Christophe JAILLET wrote: Le 01/05/2020 à 17:40, Richard Gong a écrit : Hi, On 4/29/20 1:52 AM, Christophe JAILLET wrote: Replace 'devm_kmalloc_array(... | __GFP_ZERO)' wi

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-02 Thread Christophe JAILLET
Le 01/05/2020 à 18:55, Richard Gong a écrit : Hi, On 5/1/20 10:48 AM, Christophe JAILLET wrote: Le 01/05/2020 à 17:40, Richard Gong a écrit : Hi, On 4/29/20 1:52 AM, Christophe JAILLET wrote: Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and shorter 'devm_kcalloc(...)'.

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-01 Thread Richard Gong
Hi, On 5/1/20 10:48 AM, Christophe JAILLET wrote: Le 01/05/2020 à 17:40, Richard Gong a écrit : Hi, On 4/29/20 1:52 AM, Christophe JAILLET wrote: Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and shorter 'devm_kcalloc(...)'. It doesn't make much sense. Actually devm_kca

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-01 Thread Christophe JAILLET
Le 01/05/2020 à 17:40, Richard Gong a écrit : Hi, On 4/29/20 1:52 AM, Christophe JAILLET wrote: Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and shorter 'devm_kcalloc(...)'. It doesn't make much sense. Actually devm_kcalloc returns devm_kmalloc_array(.., flag | __GFP_ZER

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-05-01 Thread Richard Gong
Hi, On 4/29/20 1:52 AM, Christophe JAILLET wrote: Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and shorter 'devm_kcalloc(...)'. It doesn't make much sense. Actually devm_kcalloc returns devm_kmalloc_array(.., flag | __GFP_ZERO). 'ctrl->genpool' can not be NULL, so axe a

Re: [PATCH 4/4 v2] firmware: stratix10-svc: Slightly simplify code

2020-04-29 Thread Markus Elfring
> Replace 'devm_kmalloc_array(... | __GFP_ZERO)' with the equivalent and > shorter 'devm_kcalloc(...)'. > > 'ctrl->genpool' can not be NULL, so axe a useless test in the remove > function. I would find it clearer to integrate also such small source code improvements by separate patches. Regards,