----- Original Message ----- > From: "SF Markus Elfring" <[email protected]> > To: "Paolo Bonzini" <[email protected]> > Cc: "Julia Lawall" <[email protected]>, "walter harms" <[email protected]>, > [email protected], > [email protected], "Christian Bornträger" <[email protected]>, > "Cornelia Huck" > <[email protected]>, "David Hildenbrand" <[email protected]>, > "Heiko Carstens" > <[email protected]>, "Martin Schwidefsky" <[email protected]>, > "Radim Krčmář" <[email protected]>, > "LKML" <[email protected]>, [email protected] > Sent: Wednesday, August 24, 2016 2:10:13 PM > Subject: Re: Replacing specific kmalloc() calls by kmalloc_array()? > > > 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 suggestion > (if additional source code control flow aspects are integrated). > > Would it make sense to check any more function combinations > in a similar way?
I don't know :) but I'm interested in seeing the semantic patch! Paolo

