[PATCH 0/3] Replace kmalloc with kmalloc_array

Daniel Baluta daniel.baluta at gmail.com
Wed Oct 21 10:22:44 EEST 2015


On Wed, Oct 21, 2015 at 1:20 AM, Cristina Moraru
<cristina.moraru09 at gmail.com> wrote:
> Replace kmalloc with specialized function kmalloc_array
> when the size is a multiplication of:
>         number_of_elements * size_of_element
>
> Done with coccinelle:
> @replace@
> identifier a, b;
> expression e, f;
> @@
> (
> - a = kmalloc(e * f, b);
> + a = kmalloc_array(e, f, b);
> )
>
>
>
> Cristina Moraru (3):
>   staging: rtl8712: Replace kmalloc with kmalloc_array
>   staging: octeon-usb: Replace kmalloc with kmalloc_array
>   staging: rdma: Replace kmalloc with kmalloc_array

All patches look good to me. Thanks Cristina!


More information about the firefly mailing list