Re: Replacing specific kmalloc() calls by kmalloc_array()?

2016-08-24 Thread Paolo Bonzini
t...@de.ibm.com>, "Martin Schwidefsky" <schwidef...@de.ibm.com>, > "Radim Krčmář" <rkrc...@redhat.com>, > "LKML" <linux-kernel@vger.kernel.org>, kernel-janit...@vger.kernel.org > Sent: Wednesday, August 24, 2016 2:10:13 PM > Sub

Re: Replacing specific kmalloc() calls by kmalloc_array()?

2016-08-24 Thread Paolo Bonzini
ck" > , "David Hildenbrand" , > "Heiko Carstens" > , "Martin Schwidefsky" , > "Radim Krčmář" , > "LKML" , kernel-janit...@vger.kernel.org > Sent: Wednesday, August 24, 2016 2:10:13 PM > Subject: Re: Replacing specific

Re: Replacing specific kmalloc() calls by kmalloc_array()?

2016-08-24 Thread SF Markus Elfring
> Or kmalloc_array, since zeroing is not necessary. Might be an idea for > a new Coccinelle script, like > > - kmalloc (N * sizeof T, GFP) > + kmalloc_array(N, sizeof T, GFP) I have picked your idea up. The corresponding script for the semantic patch language became longer than your general

Re: Replacing specific kmalloc() calls by kmalloc_array()?

2016-08-24 Thread SF Markus Elfring
> Or kmalloc_array, since zeroing is not necessary. Might be an idea for > a new Coccinelle script, like > > - kmalloc (N * sizeof T, GFP) > + kmalloc_array(N, sizeof T, GFP) I have picked your idea up. The corresponding script for the semantic patch language became longer than your general