[PATCH 0/3] Replace kmalloc with kmalloc_array

Cristina Moraru cristina.moraru09 at gmail.com
Wed Oct 21 01:20:19 EEST 2015


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

 drivers/staging/octeon-usb/octeon-hcd.c     | 6 +++---
 drivers/staging/rdma/amso1100/c2_provider.c | 2 +-
 drivers/staging/rdma/ipath/ipath_verbs.c    | 4 ++--
 drivers/staging/rtl8712/rtl871x_mlme.c      | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

-- 
1.9.1



More information about the firefly mailing list