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

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

 




----- Original Message -----
> From: "SF Markus Elfring" <elfring@xxxxxxxxxxxxxxxxxxxxx>
> To: "Paolo Bonzini" <pbonzini@xxxxxxxxxx>
> Cc: "Julia Lawall" <julia.lawall@xxxxxxx>, "walter harms" <wharms@xxxxxx>, kvm@xxxxxxxxxxxxxxx,
> linux-s390@xxxxxxxxxxxxxxx, "Christian Bornträger" <borntraeger@xxxxxxxxxx>, "Cornelia Huck"
> <cornelia.huck@xxxxxxxxxx>, "David Hildenbrand" <dahi@xxxxxxxxxxxxxxxxxx>, "Heiko Carstens"
> <heiko.carstens@xxxxxxxxxx>, "Martin Schwidefsky" <schwidefsky@xxxxxxxxxx>, "Radim Krčmář" <rkrcmar@xxxxxxxxxx>,
> "LKML" <linux-kernel@xxxxxxxxxxxxxxx>, kernel-janitors@xxxxxxxxxxxxxxx
> 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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux